Original Post
I am wondering why my code doesn''t work, I am trying to print text to the screen. Here''s the main loop from WinMain:
I''ve checked the code from my book(TOTWGPG) and mine matches it perfectly, please help! (i bet its something to do with my colors!)
hdc = GetDC(hwnd);
//Message loop
while (TRUE)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if (msg.message == WM_QUIT)
break;
TranslateMessage(&msg);
DispatchMessage(&msg);
} //End if
SetTextColor(hdc,RGB(256,0,0));
SetBkColor(hdc,RGB(0,0,0));
SetBkMode(hdc,TRANSPARENT);
TextOut(hdc,0,0,"Hello",strlen("Hello"));
}
ReleaseDC(hwnd,hdc);
return (msg.wParam);
} //End WinMain