6 LRESULT WINAPI
MainWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
9 WinMain(HINSTANCE hInstance
,
10 HINSTANCE hPrevInstance
,
18 wc
.lpszClassName
= "HelloClass";
19 wc
.lpfnWndProc
= MainWndProc
;
20 wc
.style
= CS_VREDRAW
| CS_HREDRAW
;
21 wc
.hInstance
= hInstance
;
22 wc
.hIcon
= LoadIcon(NULL
, (LPCTSTR
)IDI_APPLICATION
);
23 wc
.hCursor
= LoadCursor(NULL
, (LPCTSTR
)IDC_ARROW
);
24 wc
.hbrBackground
= (HBRUSH
)GetStockObject(GRAY_BRUSH
);
25 wc
.lpszMenuName
= NULL
;
28 if (RegisterClass(&wc
) == 0)
30 fprintf(stderr
, "RegisterClass failed (last error 0x%lX)\n",
35 hWnd
= CreateWindow("HelloClass",
37 WS_OVERLAPPEDWINDOW
|WS_HSCROLL
|WS_VSCROLL
,
48 fprintf(stderr
, "CreateWindow failed (last error 0x%lX)\n",
53 //tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
54 // ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
55 // DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
57 ShowWindow(hWnd
, nCmdShow
);
59 while(GetMessage(&msg
, NULL
, 0, 0))
61 TranslateMessage(&msg
);
62 DispatchMessage(&msg
);
70 LRESULT CALLBACK
MainWndProc(HWND hWnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
75 char spr
[100], sir
[100];
90 FillRect(hDC
, &Rect
, CreateSolidBrush(RGB(0xFF, 0x00, 0x00)));
96 hDC
= BeginPaint(hWnd
, &ps
);
98 //SelectObject(hDC, tf);
100 TextOut(hDC
, 10, 10, "Hello World from ReactOS!", strlen("Hello World from ReactOS!"));
101 GetClientRect(hWnd
, &clr
);
102 GetWindowRect(hWnd
, &wir
);
103 sprintf(spr
, "%lu,%lu,%lu,%lu ", clr
.left
, clr
.top
, clr
.right
, clr
.bottom
);
104 sprintf(sir
, "%lu,%lu,%lu,%lu ", wir
.left
, wir
.top
, wir
.right
, wir
.bottom
);
105 TextOut(hDC
, 10, 30, spr
, 20);
106 TextOut(hDC
, 10, 50, sir
, 20);
107 ReleaseDC ( hWnd
, hDC
);
115 return DefWindowProc(hWnd
, msg
, wParam
, lParam
);