diff --git a/reactos/apps/tests/winhello/winhello.c b/reactos/apps/tests/winhello/winhello.c index 122da78ee06..1ddb7d679e3 100644 --- a/reactos/apps/tests/winhello/winhello.c +++ b/reactos/apps/tests/winhello/winhello.c @@ -1,6 +1,7 @@ #include #include +HFONT tf; LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); int WINAPI @@ -48,6 +49,10 @@ WinMain(HINSTANCE hInstance, return(1); } + /*tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, + ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");*/ + ShowWindow(hWnd, nCmdShow); while(GetMessage(&msg, NULL, 0, 0)) @@ -56,35 +61,34 @@ WinMain(HINSTANCE hInstance, DispatchMessage(&msg); } + /*DeleteObject(tf);*/ + return msg.wParam; } LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - PAINTSTRUCT ps; - HDC hDC; - HFONT tf; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - SelectObject(hDC, tf); - TextOut(hDC, 10, 10, "Hello World from ReactOS!", - strlen("Hello World from ReactOS!")); - EndPaint(hWnd, &ps); - break; + PAINTSTRUCT ps; + HDC hDC; + + switch(msg) + { + case WM_PAINT: + hDC = BeginPaint(hWnd, &ps); + SelectObject(hDC, tf); + tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, + ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); + TextOut(hDC, 10, 10, "Hello World from ReactOS!", strlen("Hello World from ReactOS!")); + EndPaint(hWnd, &ps); + break; - case WM_DESTROY: - PostQuitMessage(0); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - - return 0; + case WM_DESTROY: + PostQuitMessage(0); + break; + + default: + return DefWindowProc(hWnd, msg, wParam, lParam); + } + return 0; }