Search This Blog

Saturday, February 21, 2009

VC++ Code equivalent to DoEvents is Visual basic

//VC++ Code equivalent to DoEvents is Visual basic

void DoEvents()
{
MSG msg;

while ( ::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE ) )
{
if ( ::GetMessage(&msg, NULL, 0, 0))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
else
{
break;
}
}
}

No comments: