VC中有没有DoEvents类似的函数?

Posted on 2006-07-15 01:05 紫雨轩 C++ 阅读(2534) 评论(0)  编辑 收藏 引用 所属分类: Win32 SDK
使用这样的函数: 
    BOOL CheckMessageQueue() 
    { 
     MSG msg; 
     
     
while (PeekMessage( & msg, NULL,  0 0 , PM_REMOVE)){ 
     
if (msg.message == WM_QUIT) 
     
return  FALSE; 
     TranslateMessage(
& msg); 
     DispatchMessage(
& msg); 
     } 
     
return  TRUE; 
    } 
    
该函数可以实现DoEvents的效果。但有一点不同,如果该函数返回FALSE,说明用户按下了关闭按钮。

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


posts - 18, comments - 22, trackbacks - 0, articles - 7

Copyright © 紫雨轩 C++