轩辕剑之苍之涛收费吗:define private messages

来源:百度文库 编辑:九乡新闻网 时间:2024/07/14 09:33:44

WM_APP

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

#define WM_APP                          0x8000

Remarks

The WM_APP constant is used to distinguish between message valuesthat are reserved for use by the system and values that can be used byan application to send messages within a private window class. Thefollowing are the ranges of message numbers available.

Range Meaning 0 through WM_USER–1 Messages reserved for use by the system. WM_USER through 0x7FFF Integer messages for use by private window classes. WM_APP through 0xBFFF Messages available for use by applications. 0xC000 through 0xFFFF String messages for use by applications. Greater than 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.

Message numbers in the second range (WM_USERthrough 0x7FFF) can be defined and used by an application to sendmessages within a private window class. These values cannot be used todefine messages that are meaningful throughout an application, becausesome predefined window classes already define values in this range. Forexample, predefined control classes such as BUTTON, EDIT, LISTBOX, andCOMBOBOX may use these values. Messages in this range should not be sentto other applications unless the applications have been designed toexchange messages and to attach the same meaning to the message numbers.

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

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 applicationsthat register the same string can use the associated message number forexchanging messages. The actual message number, however, is not aconstant and cannot be assumed to be the same between differentsessions.

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

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)