从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的更多相关文章

  1. PostMessage与SendMessage各自的问题

     深入解析SendMessage.PostMessage 本文将使用C++语言,在MFC框架的配合下给出PostMessage.SendMessage等的使用方式与使用不当造成的后果(讨论均针对自定义 ...

  2. [C#.net]PostMessage与SendMessage的区别

    用 PostMessage.SendNotifyMessage.SendMessageCallback 等异步函数发送系统消息时,参数里不可以使用指针,因为发送者并不等待消息的处理就返回,接受者还没处 ...

  3. PostMessage与SendMessage的区别(二)

    在做基于窗口的Windows程序的时候,我们避免不了要向窗口发送消息,有两种方式,一种是PostMessage,另外一种是SendMessage.关于这两个宏,我是通过狠狠的看MSDN才搞明白的,那里 ...

  4. MFC发送自定义消息-PostMessage和SendMessage

    PostMessage:把消息投放到线程的消息队列,不能消息被处理就立即返回SendMessage:消息被处理完后才返回 几种发送消息的写法:   ::PostMessage(GetSafeHwnd( ...

  5. PostMessage和SendMessage的区别

    1, PostMessage只把消息放入队列,不管其他程序是否处理都返回,然后继续执行,这是个异步消息投放函数.而SendMessage必须等待其他程序处理消息完了之后才返回,继续执行,这是个同步消息 ...

  6. postMessage和sendMessage

    参考:http://www.cnblogs.com/giggle/p/5350288.html(浅谈webWorker) http://blog.csdn.net/zha_zi/article/det ...

  7. PostMessage与SendMessage的区别

    PostMessage只负责将消息放到消息队列中,不确定何时及是否处理 SendMessage要等到受到消息处理的返回码(DWord类型)后才继续 PostMessage执行后马上返回 SendMes ...

  8. VC++中PostMessage、SendMessage和PeekMessage之间的区别

    1, PostMessage只把消息放入队列,不管其他程序是否处理都返回,然后继续执行,这是个异步消息投放函数.而SendMessage必须等待其他程序处理消息完了之后才返回,继续执行,这是个同步消息 ...

  9. MFC窗口消息PostMessage和SendMessage

    以前这些消息用得比较少,但是今天碰到了个事儿,我看非用消息不可. 事情是这样的,我在线程中需要刷新对话框上面的内容,但是每每执行到UpdateData时就出现了断言错误. 查了相关资料,发现这个可能是 ...

随机推荐

  1. 谷歌地图api访问失败

    在非外网情况下,我们调用谷歌api会出现加载不到地图的现象,此时可以换一下域名试试也许就好了 比如我自己访问api时时这样写的: https://maps.googleapis.com/maps/ap ...

  2. js el jstl list 循环

    需要在js中获取从Controller传过来的list集合,通过循环遍历找到对应的值,赋值到指定input框中 刚开始做法: for (var h = 0; h < gradesize; h++ ...

  3. 【MySQL】PostgresSQL-MySQL对比

    PostgresSQL-MySQL对比 (5 条消息)PostgreSQL 与 MySQL 相比,优势何在? - 知乎 IOC匹配 - 天眼公共空间 - 360企业安全Confluence 调查分析 ...

  4. VC++深入详解-第四章学习心得

    这一章节主要讲解了 简单的绘图 主要是通过一些小的例子让我们学会了VC++的一些基本操作 void CDrawView::OnLButtonDown(UINT nFlags, CPoint point ...

  5. JavaSE(十)之Map总结 (转)

    http://www.cnblogs.com/zhangyinhua/p/7545979.html 阅读目录(Content) 一.Map接口 1.1.为什么Collection不能满足集合的所有功能 ...

  6. EF 数据类型 0xA7 的数据长度或元数据长度无效

    测试方法 TestProject1.SysTest.HtmlAnalysisTest12 引发异常:  System.Data.UpdateException: 更新项时出错.有关详细信息,请参阅“I ...

  7. MSVC and MinGW DLLs

    Posted February 26th, 2009 by earnie dll faq msvc TODO: Reformat to new wiki syntax. !!! [Minimalist ...

  8. 红米1线刷救砖教程V5版(移动联通适用,线刷包永久有效)

    红米1线刷救砖教程V5版(移动联通适用,线刷包永久有效) 原文来自:http://www.miui.com/thread-1890972-1-1.html?mobile=2 ,加了些自己的经验. (我 ...

  9. 定制加载loading 图片

    项目中要使用一个动态加载图片,找了好久都没有合适的最后发现了这个网站,自由定制需要的gif图片,完全免费啊 http://preloaders.net/en/

  10. easyui datagrid实现拖动表头

    $.extend($.fn.datagrid.methods, { columnMoving: function (jq) { return jq.each(function () { var tar ...