摘要: 在按钮等被禁用后,可能需要它在禁用期间不去响应任何消息。可以使用下面的语句片段:MSG msg; //消耗掉消息队列中的所有消息 while(::PeekMessage(&msg,NULL,0,0,PM_REMOVE)) { //WM_PAINT不能被REMOVE,需要Dispatch if (msg.message=WM_PAINT) { ::DispatchMessage(&msg); } } 阅读全文
posted @ 2011-01-18 22:21 OYJJ 阅读(2777) 评论(0) 推荐(0) 编辑