Original Post
while(!bDone)
{
if(PeekMessage(&msg,NULL,0,0,PM_NOREMOVE))
{
if(msg.message==WM_QUIT)
{
bDone=TRUE;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
else
{
if(keys[VK_ESCAPE]) //<------- o_O
{
bDone=TRUE;
}
else
{
DrawScene();
SwapBuffers(hDC);
}
}
}
The problem is the program never gets to the pointed line. And when I start the application it uses 90% of my CPU... The only way not to get there is to have an infinite number of messages in the queue but why????
It does not matter what you will reach in your life, but the way you will reach it