关于PEEKMESSAGE的一个问题
while (GetMessage(&msg, NULL, 0, 0)){
//if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
请问高手为什么在我把上边的注释去掉以后程序运行得有点卡,甚至会有很长一段时间没有响应
PEEKMESSAGE的使用应该不会有问题的吧?
我用的是VS2005+WINXP --------------------编程问答-------------------- You can use the PeekMessage function to examine a message queue during a lengthy operation. PeekMessage is similar to the GetMessage function; both check a message queue for a message that matches the filter criteria and then copy the message to an MSG structure. The main difference between the two functions is that GetMessage does not return until a message matching the filter criteria is placed in the queue, whereas PeekMessage returns immediately regardless of whether a message is in the queue.
--------------------编程问答-------------------- 接分先!
补充:.NET技术 , VC.NET