您的位置:首页 > 其它

SendMessage 与Postmessage区别

2015-09-13 16:02 393 查看


SendMessage 与Postmessage有什么区别,

MSDN 是提到

The SendMessage member function calls the window procedure directly and does not return until that window procedure has processed the message. This is in contrast to the PostMessage member function, which places the message into the window's message queue and
returns immediately.

SendMessage就是同步函数,它不但发送消息到消息队列,


还需要等待消息被执行完才返回;


相反PostMessage就是个异步函数,它只管发送一个消息,而不管这个消息

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: