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编辑过]