如果我想在MFC里面实现类似功能的代码应该怎么做?(主要是如何在消息循环后面加上一些处理?) while( GetMessage( &msg, NULL, 0, 0) )
{
if( msg.message == WM_QUIT )
{
// Stop loop if it's a quit message
bDone = true;
}
else
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
if (timer.ReadyForNextFrame())
{
//update the gun
g_Gun.Update();
//this will call WM_PAINT which will render our scene
InvalidateRect(hWnd, NULL, TRUE);
UpdateWindow(hWnd);
}
}
{
if( msg.message == WM_QUIT )
{
// Stop loop if it's a quit message
bDone = true;
}
else
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
if (timer.ReadyForNextFrame())
{
//update the gun
g_Gun.Update();
//this will call WM_PAINT which will render our scene
InvalidateRect(hWnd, NULL, TRUE);
UpdateWindow(hWnd);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货