网站首页  词典首页

请输入您要查询的函数:

 

术语 registerwindowmessage
释义 RegisterWindowMessage
语法:
UINT RegisterWindowMessage( LPCTSTR lpString
);
RegisterWindowMessage函数
RegisterWindowMessage函数定义了一个新的窗口消息保证在整个系统中唯一。该消息值可用于在发送或发布消息。
参数
lpString
[in]指向一个空结束的字符串,它指定了信息登记。
返回值
如果消息是注册成功,返回值是通过0xFFFF的范围在0xC000消息标识符。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
RegisterWindowMessage函数通常用于注册两个合作应用程序之间的信息传播。
如果两个不同的应用程序注册了相同的消息字符串,应用程序返回相同的消息值。该消息仍然登记,直到会议结束。
只使用RegisterWindowMessage当多个应用程序必须处理同样的信息。对于在一个窗口类发送私人邮件,应用程序可以使用的范围WM_USER通过0x7FFF的任何整数。在此范围(邮件是私有的窗口类,而不是一个应用程序。例如,预定如按钮,编辑,ListBox控件类和组合框可以使用在此范围内的值。)
在Windows 95/98/Me:RegisterWindowMessageW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
例如
有关示例,请参阅查找文本。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
消息和消息队列概述,PostMessage,SendMessage消息
==英文原文==RegisterWindowMessage Function
The RegisterWindowMessage function defines a new window message that is guaranteed to be unique throughout the system. The message value can be used when sending or posting messages.
Syntax
UINT RegisterWindowMessage( LPCTSTR lpString
);
Parameters
lpString
[in] Pointer to a null-terminated string that specifies the message to be registered.
Return Value
If the message is successfully registered, the return value is a message identifier in the range 0xC000 through 0xFFFF.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
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.)
Windows 95/98/Me: RegisterWindowMessageW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Example
For an example, see Finding Text .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Messages and Message Queues Overview , PostMessage , SendMessage
==原始网址==http://msdn.microsoft.com/en-us/library/ms644947(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:32:45