i've changed my "message pump" from:
--------------------------
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
--------------------------
to:
--------------------------
while( 1 )
{
if( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
{
if( !GetMessage( &msg, NULL, 0, 0 ) ) return msg.wParam;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else if( bActive ) // if the application has the focus
{
DisplayGraph(); // display graph
}
else
{
WaitMessage();
}
}
--------------------------
/in DisplayGraph() i use FillRect, some PolyPolyLine and BitBlt;
on Win2k/XP it works well,
but on Win9x not :(.
why Win9x hungs?