PostMessage 跟 SendMessage的区别
2016-03-23 14:29
309 查看
一般来说这种Windows API在MSDN上都有比较完整的描述,这里为了巩固记忆,把他记下来
BOOL WINAPI PostMessage(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
把消息分发到与创建hwnd窗口相关联的线程的消息队列上,不需要等待线程处理消息,即刻返回
MSDN:
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.
BOOL WINAPI SendMessage(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
这个函数直接调用hwnd窗口对应的窗口过程对消息进行处理,直到消息处理完成后才返回
MSDN:
Sends the specified message to a window or windows. The SendMessage function
calls the window procedure for
the specified window and does not return
until the window procedure has processed the message.
BOOL WINAPI PostMessage(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
把消息分发到与创建hwnd窗口相关联的线程的消息队列上,不需要等待线程处理消息,即刻返回
MSDN:
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.
BOOL WINAPI SendMessage(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
这个函数直接调用hwnd窗口对应的窗口过程对消息进行处理,直到消息处理完成后才返回
MSDN:
Sends the specified message to a window or windows. The SendMessage function
calls the window procedure for
the specified window and does not return
until the window procedure has processed the message.
相关文章推荐
- Redis学习之持久化方式和配置
- 树链剖分
- leetcode 321. Create Maximum Number
- 理解MySQL存储过程和函数
- String.split()结尾空字符串将被丢弃
- Fragment详解(二):Fragment 与支持库
- Go时间格式化和类型互换操作
- PowerDesigner建模经验
- 关于IOS我要学的d
- Jedis 操作
- wait与waitpid
- Tags Layers
- 25. Reverse Nodes in k-Group
- 最强正则表达式
- iOS 分类(category)、扩展(Extension)
- 306. Additive Number
- jquery鼠标悬停时的放大图片的图片提示效果
- NOIp 2010 导弹拦截
- JSON.parse()方法
- 队列—队列的存储实现及运算实现