I'm trying to display text into my window. My idea is to create a count down that displays in the window, using a for loop. I'm using the sleep() function to control the time.
Basically I just want the text to be displayed in window as the count down decrements.
It's suppose to go like this:
Here's my code:
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
int count = 5;
hdc = BeginPaint(hwnd, &ps);
for(i=0; i<5; i++)
Sleep(1000);//causes the main thread to sleep for 1 seconds - allowing another thread to run
TextOut(hdc, 20, 20,TEXT("count = %d\n",count),12);
return DefWindowProc(hwnd, message, wParam, lParam);