postmessage and sendmessage
从msdn上看二者的解释:
postmessage : 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.
To post a message in the message queue associated with a thread, use the PostThreadMessage function.
There is a limit of 10,000 posted messages per message queue. This limit should be sufficiently large. If your application exceeds the limit, it should be redesigned to avoid consuming so many system resources. To adjust this limit, modify the following registry key.
就是异步函数,但是投递数量有限制。
sendmessage:
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.
To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.
可以看出sendmessage是同步的。
postmessage and sendmessage的更多相关文章
- PostMessage与SendMessage各自的问题
深入解析SendMessage.PostMessage 本文将使用C++语言,在MFC框架的配合下给出PostMessage.SendMessage等的使用方式与使用不当造成的后果(讨论均针对自定义 ...
- [C#.net]PostMessage与SendMessage的区别
用 PostMessage.SendNotifyMessage.SendMessageCallback 等异步函数发送系统消息时,参数里不可以使用指针,因为发送者并不等待消息的处理就返回,接受者还没处 ...
- PostMessage与SendMessage的区别(二)
在做基于窗口的Windows程序的时候,我们避免不了要向窗口发送消息,有两种方式,一种是PostMessage,另外一种是SendMessage.关于这两个宏,我是通过狠狠的看MSDN才搞明白的,那里 ...
- MFC发送自定义消息-PostMessage和SendMessage
PostMessage:把消息投放到线程的消息队列,不能消息被处理就立即返回SendMessage:消息被处理完后才返回 几种发送消息的写法: ::PostMessage(GetSafeHwnd( ...
- PostMessage和SendMessage的区别
1, PostMessage只把消息放入队列,不管其他程序是否处理都返回,然后继续执行,这是个异步消息投放函数.而SendMessage必须等待其他程序处理消息完了之后才返回,继续执行,这是个同步消息 ...
- postMessage和sendMessage
参考:http://www.cnblogs.com/giggle/p/5350288.html(浅谈webWorker) http://blog.csdn.net/zha_zi/article/det ...
- PostMessage与SendMessage的区别
PostMessage只负责将消息放到消息队列中,不确定何时及是否处理 SendMessage要等到受到消息处理的返回码(DWord类型)后才继续 PostMessage执行后马上返回 SendMes ...
- VC++中PostMessage、SendMessage和PeekMessage之间的区别
1, PostMessage只把消息放入队列,不管其他程序是否处理都返回,然后继续执行,这是个异步消息投放函数.而SendMessage必须等待其他程序处理消息完了之后才返回,继续执行,这是个同步消息 ...
- MFC窗口消息PostMessage和SendMessage
以前这些消息用得比较少,但是今天碰到了个事儿,我看非用消息不可. 事情是这样的,我在线程中需要刷新对话框上面的内容,但是每每执行到UpdateData时就出现了断言错误. 查了相关资料,发现这个可能是 ...
随机推荐
- How to skip to next iteration in jQuery.each() util?
[问] I'm trying to iterate through an array of elements. jQuery's documentation says: jquery.Each() ...
- "Value does not fall within the expected range" with managed metadata fields
From: http://geekswithblogs.net/claraoscura/archive/2011/01/21/143569.aspx The problem: I have an ...
- 启动项目时出现Not a JAR.......Find JAR........一指循环就是起不来
出现问题原因就是mapper的映射文件有问题,里面的返回类型如是实体找不到或者找重复的就会这样 解决办法就是:确保在用的实体(路径)能找到,切记不能有重名的实体
- moodle安装体验
EasyPHP-5.3.8.0+moodle 2.6.2 安装过程要耐心等待. 成功安装后.网页又訪问不了. 不知道为什么? 2015/04/12 EasyPHP-DevServer-14.1VC11 ...
- 【Python】torrentParser1.00
代码: #------------------------------------------------------------------------------------ # torrentP ...
- ngularJs项目实战!05: 不同controller作用域之间通信的方式
最近在做d3js + angularjs项目中,经常遇到d3组件与angularjs模块间通信的问题,以及angularjs多个作用域之间互相通信的问题.关于angularjs的作用域概念及其继承模式 ...
- C++代码复习笔记:第三章
getline这个方法的使用, 可以获取用户输入的一行数据, 保存到数组中: #include <iostream> #include <string> int main() ...
- PLT redirection through shared object injection into a running process
PLT redirection through shared object injection into a running process
- windows 2012授权模型
转自:http://www.aidanfinn.com/?p=13090 Remember that Microsoft licenses its servers at the physical le ...
- SqlDataAdapter概述
SqlDataAdapter是 DataSet和 SQL Server之间的桥接器,用于检索和保存数据.SqlDataAdapter通过对数据源使用适当的Transact-SQL语句映射 Fill(它 ...