求助

wudeshou82666 2009-08-06 04:20:44
让程序处于忙碌的状态,鼠标指针改为沙漏形状,不能接收任何消息。过段时间后恢复。要用到那些函数。谢谢!!!
...全文
71 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
fishion 2009-08-07
  • 打赏
  • 举报
回复
直接在PreTranslateMessage() 处理WM_LBUTTONDOWN,WM_RBUTTONDOWNT等消息
hdjfeng2009 2009-08-07
  • 打赏
  • 举报
回复
学习了...
wudeshou82666 2009-08-07
  • 打赏
  • 举报
回复
谢谢各位的回复
na_he 2009-08-06
  • 打赏
  • 举报
回复
消息是在winproc中派发的,可以尝试在winproc中直接返回FALSE,来试试了。
barech 2009-08-06
  • 打赏
  • 举报
回复
恩,突然想起来,还有这么一个函数

PreTranslateMessage()

在这里面做一下处理也挺好
luckyboy101 2009-08-06
  • 打赏
  • 举报
回复
用hook过滤键盘鼠标消息
barech 2009-08-06
  • 打赏
  • 举报
回复
是肯定可以接收消息的

在MFC的框架中GUI部分是单独具有消息队列的。

不过我们可以通过控制消息队列的方式来实现不接收消息,比如在beginWaitCursor()与EndWaitCursor()之间加一个控制位,然后在OnSysCommand()中,根据控制位来过滤这些消息,呵呵

个人见解呀

[Quote=引用 2 楼 wudeshou82666 的回复:]
引用 1 楼 happyparrot 的回复:
BeginWaitCursor()
EndWaitCursor()

用这两个函数。。。
这样好像程序还是可以接收消息。。。。
[/Quote]
barech 2009-08-06
  • 打赏
  • 举报
回复
顶楼上,呵呵

The framework calls this function to show the user that it is busy, such as when a CDocument object loads or saves itself to a file.

The actions of BeginWaitCursor() are not always effective outside of a single message handler as other actions, such as OnSetCursor handling, could change the cursor.

Call EndWaitCursor() to restore the previous cursor.
wudeshou82666 2009-08-06
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 happyparrot 的回复:]
BeginWaitCursor()
EndWaitCursor()
[/Quote]
用这两个函数。。。
这样好像程序还是可以接收消息。。。。
快乐鹦鹉 2009-08-06
  • 打赏
  • 举报
回复
BeginWaitCursor()
EndWaitCursor()

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧