DWORD dwStart = GetTickCount();
DWORD dwEnd = dwStart;
do
{
 MSG msg;
 GetMessage(&msg,NULL,0,0);
   // or PeekMessage(&msg,NULL,0,0,PM_REMOVE);
 TranslateMessage(&msg);
 DispatchMessage(&msg);
 dwEnd = GetTickCount()-dwStart;
}while(dwEnd <50);

相关文章: