Original Post
I've been working on a 3d engine under Win98 for some time now and everything works fine,....but i couldn´t get it to work under WinXP, i ignored the problem for a while but today i decided to fix it. I found out the problem was my message pump,....
I replaced it with this one ("borrowed" from one of NeHe's tutorials)
Everything works fine now,..... My question is why does the first one refuse to work under XP ?????
-Crawl
[edited by - Crawl on June 8, 2002 9:41:21 AM]
BOOL bGotMsg;
MSG msg;
msg.message = WM_NULL;
PeekMessage( &msg, NULL, 0U, 0U, PM_NOREMOVE );
while( WM_QUIT != msg.message )
{
bGotMsg = PeekMessage( &msg, NULL, 0U, 0U, PM_NOREMOVE );
if( bGotMsg )
{
GetMessage( &msg, m_hWnd, 0, 0 );
TranslateMessage( &msg );
DispatchMessage( &msg );
}
else
if ( m_bReady )
{
// Render frame here
}
}
MSG msg;
BOOL done=FALSE;
while(!done)
{
if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if (msg.message==WM_QUIT)
{
done=TRUE;
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
else
if ( m_bReady )
{
// Render frame here
}
}