| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2348 人关注过本帖
标题:[求助] SendMessage发送的消息是否会被GetMessage处理?
取消只看楼主 加入收藏
hixiaopeng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-4-14
收藏
 问题点数:0 回复次数:0 
[求助] SendMessage发送的消息是否会被GetMessage处理?

MSDN中有两段关于GetMessage与SendMessage的话:

1.---The SendMessage function is used to send a message directly to a window procedure.
The SendMessage function sends the specified message to a window or windows. It calls the window procedure for the specified window and does not return until the window procedure has processed the message.

2.---The GetMessage function retrieves a message from the calling thread's message queue. The function dispatches incoming sent messages until a posted message is available for retrieval.

疑问:
即然第一句说Sendmessage函数将消息直接发送给Winpro函数处理的, 也就是不用经过线程消息队列喽, 但是上面第二这句话为什么又说当在线程消息队列中没有可用的Posted消息时, GetMessage函数会将Sent来的消息dispatch呢,这应该不属于GetMessage的责任啊? Sendmessage发来的消息应该与Getmessage函数没关系吧, 请问是我是否理解错误?

还有一个问题: 消息队列有系统消息队列和线程消息队列两种,我想问是不是所有的消息都要先进入系统消息队列, 然后再由系统将其post到相应线程队列或者直接send给winpro处理呢?谢谢

[此贴子已经被作者于2006-4-14 14:28:30编辑过]

搜索更多相关主题的帖子: SendMessage GetMessage windows message procedure 
2006-04-14 14:12
快速回复:[求助] SendMessage发送的消息是否会被GetMessage处理?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015368 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved