Hello...
Currently, my big main project is learning how to make a good OpenGL window... And, I dont really think I can do it real well without knowing how to make a simple windows window. I want it to have a few simple functions... one of them is being a pause key It wont stop anything(yet) and all I want it to do is display PAUSED in the middle of the screen. However, when I press my pause key (p), nothing happens. It worked fine with PostQuitMessage(0), so its not they way the key is. (having a key close my program is my tester ) Here is the code:

------------------------------------------------------------------------------------


#include <windows.h>

bool active=TRUE;

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
PAINTSTRUCT ps;
char string[] = "This is the advanced window!!!";
char paused[] = "PAUSED";
HDC hDC;
switch(msg){
case WM_CREATE:
return 0;
break;
case WM_CLOSE:
PostQuitMessage(0);
return 0;
break;
case WM_PAINT:
hDC = BeginPaint(hwnd, &ps);
SetTextColor(hDC, COLORREF(0x00FF0000));
TextOut(hDC, 50, 50, string, sizeof(string)-1);
////////////////////////////////////////////////////////////////////
if(active = false){
SetTextColor(hDC, COLORREF(0x01FF0000));
TextOut(hDC, 35, 50, string, sizeof(paused)-1);
}
////////////////////////////////////////////////////////////////////
EndPaint(hwnd, &ps);
return 0;
break;
case WM_KEYDOWN:
if( GetAsyncKeyState( 'P' ) )
{
////////////////////////////////////////////////////////////////////
active = false;
UpdateWindow(hwnd);
////////////////////////////////////////////////////////////////////
}
return 0;
case WM_KEYUP:
if( GetAsyncKeyState( VK_SHIFT ) )
{
PostQuitMessage( 0 );
}
return 0;
default:
break;
}
return(DefWindowProc(hwnd, msg, wparam, lparam));
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
WNDCLASSEX wc;
HWND hwnd;
MSG msg;
bool done;

wc.cbClsExtra = 0;
wc.cbSize = sizeof(WNDCLASSEX);
wc.cbWndExtra = 0;
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wc.hCursor = LoadCursor(NULL, IDC_CROSS);
wc.hIcon = LoadIcon(NULL, NULL);
wc.hIconSm = LoadIcon(NULL, NULL);
wc.hInstance = hInstance;
wc.lpfnWndProc = WndProc;
wc.lpszClassName = "WCClass";
wc.lpszMenuName = NULL;
wc.style = CS_HREDRAW | CS_VREDRAW;

if(!RegisterClassEx(&wc))
return 0;

hwnd = CreateWindowEx(NULL,
"WCClass", "Advanced Window",
WS_VISIBLE | WS_OVERLAPPEDWINDOW,
50, 50, 250, 250,
NULL, NULL, hInstance, NULL);

ShowWindow(hwnd, nShowCmd);
UpdateWindow(hwnd);

if(!hwnd)
return 0;


done = false;

while(!done)
{
PeekMessage(&msg, hwnd, NULL, NULL, PM_REMOVE);

if(msg.message == WM_QUIT)
{
done = true;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
if( GetAsyncKeyState( VK_ESCAPE ) )
PostQuitMessage( 0 );

}
return msg.wParam;
}
-----------------------------------------------------------------------------------

If anyone knows what is wrong, please tell me
Thanks!