Understanding the Window WinMain Cycle
I am looking at the code in my WinMain, I know what it does,
I just don't know the exact particulars and what regulates it.
//Process the message
//Make sure the game engine isn't sleeping
//Check the tick count to see if a game cycle has
In the line if(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) it
is passing the message to be Translated and Dispatched if it fails to Peek, but how would it know what the messag is if it could not peek at it?
So I am assuming that it is trying to peek, if it can then great perform a GameCycle, otherwise check to see it is a quit message, then translate it.
How often is this cycle of peeking messages ran through? Is it based on CPU Cycles...?
Just seeking to understand everything better...
Thanks for any responses.