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时就出现了断言错误. 查了相关资料,发现这个可能是 ...
随机推荐
- C++ 学习路线和看法
C++ 学习路线和看法 原文地址:http://shundacao.blog.163.com/blog/static/1340404812010101982751101/ C++大体分为C++ ...
- SCIKIT-LEARN与GBDT使用案例
http://blog.csdn.net/superzrx/article/details/47073847 安装 SCIKIT-LEARN是一个基于Python/numpy/scipy的机器学习库 ...
- web自适应手机浏览器的宽度
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scal ...
- How could I create a custom windows message?
[问题] Our project is running on Windows CE 6.0 and is written in C++ . We have some problems with the ...
- ElasticSearch5.X—模糊查询和获取所有索引字段
最近在做一个分布式数据存储的项目,需要用到ElastciSearch加速数据查询,其中部分功能需要进行模糊查询和统计索引库中已经建立的索引字段,网上查阅了很多资料,最终把这两个问题解决了,不容易!下面 ...
- windows vs2017环境下编译webkit
源码地址:https://github.com/BlzFans/wke 先看官方的说明: Web和Flash的嵌入式3D游戏,基于WebKit 建筑工作单元 VS2005: 1安装Visual Stu ...
- Hbase总结(六)hbase37个笔试题
下面试题是摘自互联网的基础上自己加了选项说明解释便于自己以后看时方便节省时间 1. HBase来源于哪篇博文? C A The Google File System B MapReduce C Big ...
- “服务器推”技术【转载+整理】
原文地址 本文内容 "服务器推(server-push)"技术的应用 基于客户端套接口的"服务器推"技术 基于 HTTP 长连接的"服务器推" ...
- Tomcat上文件的绝对路径访问笔记
部署到Tomcat上的web项目的文件在代码中访问,可以先通过request获取到项目的根目录绝对路径,然后自己拼接子目录路径,直到文件.方法如下: String realpath=request.g ...
- Can't connect to MySQL server on 'ip' (13)
解决方法1.:setsebool -P httpd_can_network_connect_db=1 解决方法2.:修改/etc/selinux/config SELINUX=enforcing 为 ...