VC中类似于vb中doevents的功能
MSG msg;
while(::PeekMessage(&msg,m_hWnd,NULL,NULL,PM_REMOVE))
AfxGetApp()->PumpMessage();
或者
MSG msg;
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
//以下是代码
#include <iostream.h>
void main()
{
long i=0;
do
{
i=i+1;
MSG msg;
while(::PeekMessage(&msg,m_hWnd,NULL,NULL,PM_REMOVE))
AfxGetApp()->PumpMessage();
}
while(5>3);
}
好象有错误,编译有问题出现.该怎么解决
能否给我一个完全的例子,要包含的头文件也写出来.谢谢.