Chinaunix首页 | 论坛 | 博客
  • 博客访问: 110901
  • 博文数量: 52
  • 博客积分: 2050
  • 博客等级: 大尉
  • 技术积分: 451
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-06 15:52
文章分类

全部博文(52)

文章存档

2011年(1)

2010年(2)

2009年(49)

我的朋友

分类:

2009-12-29 16:03:43

关于windows自定义消息
有两种方法ON_REGISTERED_MESSAGE  和 ON_MESSAGE,具体的可以查msdn,比较清楚。但要指出重要的一
点是ON_REGISTERED_MESSAGE  适用于两个合作的appplication,也就是进程间的通信,两个进程注册同
一个message,然后可以一个发,一个处理。
The RegisterWindowMessage function is typically used to register messages for communicating between two cooperating applications.
If two different applications register the same message string, the applications return the same message value. The message remains registered until the session ends.
Only use RegisterWindowMessage when more than one application must process the same message. For sending private messages within a window class, an application can use any integer in the range WM_USER through 0x7FFF. (Messages in this range are private to a window class, not to an application. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use values in this range.)

关于发送消息
PostMeesage SendMessage
post是寄送,送完了就返回,接受者怎么处理时自己的事情,发送者不管。
send是发生,要等处理完,才返回,所以一般不怎么用,如果一直不返回,会造成死锁
阅读(857) | 评论(0) | 转发(0) |
0

上一篇:关于钩子

下一篇:关于HeapCreate(1)

给主人留下些什么吧!~~