标题:[求助] 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



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-57448-1-1.html




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

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