请输入您要查询的百科知识:

 

词条 WM_APP
释义

WM_APP

Used to define private messages, usually of the form WM_APP+X, where X is an integer value.

用来定义私有消息,经常以WM_APP+X的格式使用,X是一个整形变量

#define WM_APP 0x8000

Remarks 注意

The WM_APP constant is used to distinguish between message values that are reserved for use by the system and values that can be used by an application to send messages within a private window class.

WM_APP常量是用来把系统预留的消息值和应用程序窗口类内部使用的消息区分开来,

The following are the ranges of message numbers available.

下列范围的消息代码可用

Range
范围 Meaning
意义

0 through WM_USER -1
0 到 WM_USER -1 Message reserved for use by the system
系统预留使用的

WM_USER through 0x7FFF
WM_USER 到 0x7FFF Integer messages for use by private window classes
被私有窗口类使用的整形消息

WM_APP through 0xBFFF
WM_APP 到 0xBFFF Message available for use by applications
可以被应用程序使用的消息

0xC000 through 0xFFFF
0xC000 到 0xFFFF String messages for use by applications
被应用程序使用的字符串消息

Greater than 0xFFFF
大于0xFFFF Reserved by the system
系统预留Message numbers in the first range (0 through WM_USER–1) are defined by the system. Values in this range that are not explicitly defined are reserved by the system.

第一个范围里的消息代码(0到WM_USER-1)是被系统定义的,这个范围内的值.这个范围内没有明确定义的值也是系统预留的.

Message numbers in the second range (WM_USER through 0x7FFF) can be defined and used by an application to send messages within a private window class. These values cannot be used to define messages that are meaningful throughout an application, because some predefined window classes already define values in this range. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use these values. Messages in this range should not be sent to other applications unless the applications have been designed to exchange messages and to attach the same meaning to the message numbers.

第二个范围内的消息代码(WM_USER 到 0x7FFFF)可以被定义,并且可以被应用程序使用,以在私有窗口类范围内传递消息,这些值不能在应用程序范围内定义为有意义的消息,因为一些预定义的窗口类可能已经在这个范围内定义了这些值.例如一个预定义的控件,像BUTTON(按钮),EDIT(编辑框)LISTBOX()COMBOBOX()可能使用这些值了.这个范围内的值不应该被发送到其他的应用程序,除非接受的那个程序是被设计成交换信息的,或者相同在消息代码上有相同的意义.

Message numbers in the third range (0x8000 through 0xBFFF) are available for application to use as private messages. Message in this range do not conflict with system messages.

在第三个范围内的消息代码(0x8000到0xBFFF)可以被应用程序作为私有消息,这个范围内的值和系统消息不冲突.

Message numbers in the fourth range (0xC000 through 0xFFFF) are defined at run time when an application calls the RegisterWindowMessage function to retrieve a message number for a string. All applications that register the same string can use the associated message number for exchanging messages. The actual message number, however, is not a constant and cannot be assumed to be the same between different sessions.

第四个范围的消息代码(0xC000 到 0xFFFF)是在运行时定义的,是由一个应用程序调用RegisterWindowMessage函数来注册一个字符串消息时定义的.所有注册相同字符串的应用程序可以使用被分配的消息代码来交换消息,然而真实消息代码不是一个常量,并且在不同的会话中不能假定为一样的值

Message numbers in the fifth range (greater than 0xFFFF) are reserved by the system.

第五个范围的消息代码(大于0xFFFF)是被系统预留的.

Requirement

Minimum supported client
所支持的最低客户端版本 Windows 2000 Professional

Minimum supported server
所支持的最低服务器版本 Windows 2000 Server

Header
头文件 WinUser.h (include Window.h)

See Also参见

ReferenceRegister

WindowMessage

WM_USER

Conceptual相关概念

Messages and Message Queues

注:只无偿负责翻译,不负任何法律及其他责任.重要事情请参见权威解释

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2024/11/16 15:19:32