Simple message problem...
I've been reading a book about how computer games are made, and I came across the "PeekMessage" command for windows programming, and the book said to write it as below, but my compiler (Dev-C++, if that helps) wont accept it when I try use it to process input and logic etc, so, is it a problem with the code, or is it something else???
Code:
while(1)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
// test if this is a quit
if (msg.message == WM_QUIT)
break;
// translate any accelerator keys
TranslateMessage(&msg);
// send the message to the window proc
DispatchMessage(&msg);
} // end if
// main game processing goes here