首页 > 其他 > 详细

SendMessage 与 PostMessage

时间:2015-12-23 19:43:50      阅读:213      评论:0      收藏:0      [点我收藏+]

先看MSDN的解释:

SendMessage:

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.

SendMessage函数将指定的消息发到窗口。它调用特定窗口的窗口处理函数,并且不会立即返回,直到窗口处理函数处理了这个消息。

 

PostMessage:

The PostMessage function places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.

PostMessage函数将一个消息放入与创建这个窗口的消息队列相关的线程中,并立刻返回不等待线程处理消息。

 

SendMessage所发送的消息是会调用WndProc,等待WndProc处理消息并返回后它才返回。

PostMessage是向指定的窗口的线程的消息队列中发送当前的消息,并且立即返回。

SendMessage 与 PostMessage

原文:http://www.cnblogs.com/-sev-/p/5070858.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!