Message range |
Description |
0 ~ WM_USER – 1 |
System Message |
WM_USER ~ 0x7FFF |
Custom window classIntegerMessage |
WM_APP ~ 0xBFFF |
Application custom message |
0xC000 ~ 0xFFFF |
ApplicationStringMessage |
> 0xFFFF |
Reserved for future system applications |
Message name |
Value | 说 Ming |
||
##WM_ | 0x0000
|
Empty message, this message will be ignored by the receiving window | ||
WM_CREATE | 0x0 | ##The application creates a window|||
| 0x0002 | A window was destroyed|||
0x0003 | Move a window | |||
0x0005 | Change the size of a window | |||
0x0006 | A window is activated or deactivated | Status|||
FOCUS0x0007 | After gaining focus | |||
0x0008 | Lost focus | |||
0x000A | Produced when the application Enable state changes | |||
##0x000B |
Set whether the window can be redrawn |
WM_SETTEXT | ||
0x000C |
An application sends this message to set the text of a window |
WM_GETTEXT | ||
0x000D |
The application sends this message to copy the text of the corresponding window to the buffer |
|||
WM_GETTEXTLENGTH |
0x000E |
Get the length of the text associated with a window (excluding null characters) |
||
WM_PAINT |
0x000F |
Ask a window to repaint itself |
||
WM_CLOSE |
0x0010 |
Sends a signal when a window or application is to be closed |
||
##0x0011 | The user chooses to end the conversation The box or application itself calls ExitWindows() | |||
0x0012 | Used to end program running or the application calls the Postquitmessage() function to generate this message | |||
0x0013 | When the user window is restored to its previous size and position, send this message to an icon | |||
0x0014 | ##When the window background must be erased (such as when the window is resized) | |||
0x0015 | Sent when the system color changes This message is given to all top-level windows | |||
0x0016 | When the system process issues the WM_QUERYENDSESSION message, this message is sent to the application | ##WM_SHOWWINDOW | ||
##0x0018 | This message is sent to this window when hiding or showing the window | ##WM_ACTIVATEAPP |
||
When a window will be activated, the activated window and the currently active (about to lose activation) window will receive this message. Which window should the application send this message to? Which one is activated and which one is inactive | WM_FONTCHANGE |
|||
Send this message to all top-level windows when the system's font resource library changes |
||||
##WM_ TIME CHANGE |
0x001E | Send this message to all top-level windows when the system time changes | ||
WM_CANCELMODE | 0x001F | Send this message to cancel an ongoing operation | ||
WM_SETCURSOR | ##0x0020If the mouse causes the cursor to move in a window and the mouse input When it is not captured, send a message to the window | |||
0x0021 | When the cursor is in an inactive window and the user is pressing a mouse button, this message is sent to the current window | |||
0x0022 | Send this message to an MDI child window when the user clicks the title bar of this window, or when the window is activated, moved, or resized | |||
0x0023 | This message is generated by a computer-based The training program is sent and the user input message is separated through the Hook program of WH_JOURNALPALYBACK | ##WM_GETMINMAXINFO | ||
0x0024 |
When the window is about to change its size or position, send this message to the window |
WM_PAINTICON | ||
0x0026 |
Send this message to the window when the window icon is about to be redrawn |
WM_ICONERASEBKGND | ||
0x0027 |
This is sent when the icon background must be redrawn before the icon in a minimized window is redrawn. Message to this window |
##WM_ | NEXT||
GCTL | Send this message to a dialog box procedure to change the focus position | WM_SPOOLERSTATUS | ||
0x002A | This message is issued when the print management queue adds or subtracts a job |
WM_DRAWITEM | 0x002B |
Sent when the appearance of Button, ComboBox, Listbox, Menu control changes This message is for the owners of these controls |
##WM_MEASUREITEM | 0x002C | When Button, ComboBox, list box, ListView, Menu items are created, send this message to the owner of the control | ||
WM_ DELETEITEM |
0x002D | When the ListBox or ComboBox is destroyed or when some items are sent via LB_DELETE STRING, When the LB_RESETCONTENT, CB_DELETESTRING, CB_RESETCONTENT message is deleted, send this message to the owner of the control |
||
WM_V KEYTOITEM |
0x002E | A ListBox control with the LBS_WANTKEYBOARDINPUT style sends this message to its owner, In response to the WM_KEYDOWN message | ||
WM_CHARTOITEM | 0x002F | A ListBox control with the LBS_WANTKEYBOARDINPUT style sends this message to its owner in response to the WM_CHAR message | ||
WM_SETFONT | 0x0030 | When the application draws a control, this message is sent to obtain the font in which the text in the control is drawn | ||
WM_GETFONT | 0x0031 | The application sends this message to get the font of the text drawn by the current control | ||
WM_SETHOTKEY | 0x0032 | The application sends this message to associate a window with a hotkey | ||
WM_GETHOTKEY | 0x0033 | The application sends this message to determine Whether the hotkey is associated with a certain window | ||
WM_QUERYDRAGICON | 0x0037 | This message is sent to the minimized window. When this window is about to be dragged and dropped and there is no icon defined in its class, the application returns an icon or cursor handle. The system displays this icon or cursor when the user drags and drops the icon. | ||
WM_COMPAREITEM | 0x0039 | Send this message to determine the ComboBox or ListBoxNewly addedThe relative position of the added item |
||
##WM_ COMPACTING | ##0x0041Displays that the memory is very low | |||
0x0046 | This message is sent when the SetWindowPos() function is called to change the size and position of the window. Give the window | |||
0x0048 | When the system will Send this message to all processes when entering the suspend state | |||
COPY | 0x004AThis message is sent when one application passes data to another application | |||
0x004B | When a user cancels the program log activation state, send this message to the application | |||
Y0x004E | When a | of a certain control When the eventhas occurred or this control needs to get some information, send this message to its parent window | ##WM_INPUT||
When the user selects an input language, or the hotkey of the input language changes |
WM_INPUTLANGCHANGE | |||
0x0051 |
This message is sent to the affected top level when the application input language is changed. Window |
WM_TCARD | ||
0x0052 |
When the application has initialized The Windows Help routine sends this message to the application |
WM_HELP | ||
0x0053 |
When the user presses F1, if a menu is activated, this message is sent to the menu associated with this window, otherwise it is sent to the window with focus. If there is currently no focus, this message is sent. Sent to the currently active window |
WM_USERCHANGED | ||
0x0054 |
Send this message to all windows when the user has logged in or logged out. When the user logs in or logs out, the system updates The user's specific setting information, the system will send this message immediately when the user updates the settings |
|||
WM_NOTIFYFORMAT |
0x0055 |
Common controls and their parent windows use this message to determine whether to use ANSI or UNICODE structure in the WM_NOTIFY message. Using this control can make a certain The control communicates with its parent control |
||
WM_CONTEXTMENU |
0x007B |
When the user right-clicks in a window, this message is sent to the window |
||
WM_STYLECHANGING |
0x007C |
When one or more styles of the window are about to call the SetWindowLong() function, send this message to the window |
||
WM_STYLECHANGED |
0x007D |
This message is sent when one or more styles of the window are changed by calling the SetWindowLong() function Give the window |
||
##WM_ DISPLAYCHANGE |
0x007E | Send this message to all windows when the display resolution is changed | ||
WM_GETICON | 0x007F | Send this message to a window and return the handle of the large icon or small icon associated with a window | ||
WM_SETICON | 0x0080 | The application sends this message to associate a new large or small icon with a window | ||
WM_NCCREATE | 0x0081 | When a window first When created, this message is sent before the WM_CREATE message is sent | ||
WM_NCDESTROY | 0x0082 | This message notifies a window that the non-client area is being destroyed | ||
WM_NCCALCSIZE | 0x0083 | This message is sent when calculating the client area size and position of a window | ||
0x0084 | This message is generated when moving the mouse, holding down or releasing the mouse |
|||
##WM_NCPAINT | 0085 | When the frame of a window must be drawn, the application sends this message to the window |
||
WM_NCACTIVATE | 0x0086 | Indicates whether the window is active or active by changing the non-client area of a window When inactive, this message is sent to the window | ||
WM_NCMOUSEMOVE | 0x00A0 | Send this message to the window when the cursor moves within the non-client area of the window (window title bar and border) | ||
WM_NCLBUTTONDOWN | 0x00A1 | This message is sent when the cursor is in the non-client area of the window and the left mouse button is pressed | ||
WM_NCLBUTTONUP | 0x00A2 | When the cursor is in the non-client area of the window and the left mouse button is released Send this message | ||
WM_NCLBUTTONDBLCLK | 0x00A3 | When the cursor is on This message is sent when the left mouse button is double-clicked in the non-client area of the window | ||
WM_NCRBUTTONDOWN | 0x00A4 | This message is sent when the cursor is in the non-client area of the window and the right mouse button is pressed | ||
WM_NCRBUTTONUP | 0x00A5 | This message is sent when the cursor is in the non-client area of the window and the right mouse button is released | ||
WM_NCRBUTTONDBLCLK | 0x00A6 | This message is sent when the cursor is in the non-client area of the window and the right mouse button is double-clicked | ||
WM_NCMBUTTONDOWN | 0x00A7 | When the cursor is in the non-client area of the window and press This message is sent when the mouse is middle-clicked | ||
0x00A8 | This message is sent when the cursor is in the non-client area of the window and the middle mouse button is released | |||
0x00A9 | This message is sent when the cursor is in the non-client area of the window and the middle mouse button is double-clicked | |||
WM_KEYDOWN |
0x0100 |
Press a non-system key (press The "ALT" key was not pressed when the key was pressed) |
||
WM_KEYUP |
0x0101 |
Release a non-system key |
||
##WM_CHAR | 0x0102 | Press a key and send this message when TranslateMessage() forwards WM_KEYDOWN | ||
WM_DEADCHAR | 0x0103 | Release a key and send this message after TranslateMessage() forwards WM_KEYUP | ||
0x0104 | Send this message to the window with keyboard focus when holding down the ALT key while pressing other keys | |||
0x0105 | This message is sent to the owner of the keyboard when releasing a key while holding down the ALT key Focused window | |||
##0x0106 | When TranslateMessage( ) forwards WM_SYSKEYDOWN and sends this message to the window with keyboard focus | ##WM_SYSDEADCHAR | ||
0x0107 |
Send this message to the window with keyboard focus after TranslateMessage() forwards WM_SYSKEYUP |
WM_INITDIALOG | ||
0x0110 |
Send this message before the dialog box is displayed. This message is usually used to initialize the control and perform other tasks |
WM_COMMAND | ||
0x0111 |
Select a window menu item or a control to send a message to its parent window or press This message is generated when a shortcut key |
WM_SYSCOMMAND | ||
0x0112 |
Send this message to the window when selecting a window menu item or selecting to maximize or minimize |
WM_TIMER | ||
0x0113 |
Timer | EventWM_HSCROLL | ||
0x0114 |
Send this message to the owner of the window and scroll bar when the horizontal scroll bar of the window generates a scroll event |
|||
WM_VSCROLL |
0x0115 |
Send this message to the owner of the window and scroll bar when the vertical scroll bar of the window generates a scroll event |
||
WM_INITMENU |
0x0116 |
Sent when a menu is about to be activated Message, which occurs when a menu item is pressed or a menu shortcut key is pressed, which allows a program to change the menu before it is displayed |
||
##WM_INITMENUPOPUP | 0x0117 | This message is sent when a drop-down menu or submenu is about to be activated. It allows the menu to be modified without changing it before displaying. Entire menu |
||
WM_MENUSELECT | 0x011F | Select a menu item Send this message to the owner of the menu (usually the window) | ||
WM_MENUCHAR | 0x0120 | When the menu has been activated and the user pressed a key (not a shortcut key), send this message to the owner of the menu | ||
WM_ENTERIDLE | 0x0121 | Sends this message to its owner when a modal dialog box or menu enters the idle state. The idle state means that the message queue is empty after processing one or several previous messages | ||
0x0122 | This message is generated when releasing the right mouse button when the cursor is on a menu item | |||
0x0123 | Sends this message to the owner of the drag-and-drop menu when a menu item is dragged | |||
0x0124 | When the cursor moves into the menu item or moves from the center of the menu item Send this message to the owner of the drag-and-drop menu when reaching the top or bottom of a menu item | |||
0x0125 | This message is generated when the drop-down menu or submenu is destroyed | |||
0x0126 | This message is generated when the user selects a menu item | ##WM_CHANGEUISTATE | 0x0127 |
The application sends this message to indicate that the user interface (UI) state should be changed |
WM_UPDATEUISTATE |
##0x0128 | The application sends this message to change the specified window and its children. The user interface (UI) state of the window | ||
WM_QUERYUISTATE | 0x0129 | The application sends this message to get the user interface (UI) status of a certain window | ||
WM_CTLCOLORMSGBOX | 0x0132 | Send this message to its parent window before drawing the | ||
WM_CTLCOLOREDIT | 0x0133 | Send this message to its parent window before drawing the edit control. It can be used to set the text and background color of the edit box | ||
0x0134 | Send this message to its parent window before drawing the list box control, which can be used to set the text and background color of the edit box | |||
0x0135 | Send before drawing | button control This message is sent to its parent window and can be used to set the text and background color of the edit box |
||
0x0136 | Send this message to its parent window before drawing the dialog box. It can be used to set the text and background color of the edit box | |||
0x0137 | Send this message to its parent window before drawing the scroll bar control. It can be used to set the scroll bar control. Text and background color | |||
Drawing static | Send this message to its parent window before drawing the control. It can be used to set the text and background color of the static controlWM_MOUSEMOVE | |||
0x0200 |
Mouse move |
##WM_LBUTTONDOWN | ||
0x0201 | Press the left mouse button |
|||
WM_LBUTTONUP |
0x0202 |
Release the left mouse button |
||
WM_LBUTTONDBLCLK |
0x0203 | Double click the left mouse button |
||
WM_RBUTTONDOWN |
0x0204 |
Press the right mouse button |
||
##WM_RBUTTONUP | 0x0205 | Release the right mouse button | ||
WM_RBUTTONDBLCLK | 0x0206 | Double-click Right mouse button | ||
WM_MBUTTONDOWN | 0x0207 | Press the middle mouse button Key | ||
WM_MBUTTONUP | ##0x0208Release middle mouse button | |||
##0x0209 | Double-click the middle mouse button | |||
0x020A | Send this message to when the mouse wheel is rotated The currently focused window | ##WM_PARENTNOTIFY | ||
0x0210 |
When When an MDI child window is created or destroyed, or when the cursor is on the child window and the user clicks the mouse button, this message is sent to its parent window |
WM_ENTERMENULOOP | ||
0x0211 |
Send this message to notify the application's main window process that it has entered menu mode Loop |
WM_EXITMENULOOP | ||
0x0212 |
Send this message to notify the application The main window process has exited the menu mode loop |
WM_SIZING | ||
0x0214 |
Send this message to the window when resizing the window. Through this message, the application can monitor or modify the window size and position |
|||
WM_CAPTURECHANGED |
0x0215 |
When the window is set to not capture mouse events When , send this message to the window |
||
WM_MOVING |
0x0216 |
Send this message to the window when moving the window. Through this message, the application can monitor or modify the window size and position |
||
##WM_POWERBROADCAST | 0x0218 | Send this message to an application to notify it about power management events | ||
0x0219 | Send this message to an application or device when the device's hardware configuration changes | Driver | ||
0x0220 | The application sends this message to multiple documents Client window to create an MDI child window | |||
0x0221 | The application sends this message to the multi-document client window to close an MDI child window | |||
0x0222 | The application sends this message to the multi-document client window to notify the client window to activate another MDI child window. When the client window receives this message, it sends a WM_MDIACTIVE message to the MDI child window. window (not activated) to activate it | |||
ESTORE | The application sends this message to the MDI client window to notify the child window to return to its original size |
WM_MDINEXT | ||
0x0224 |
The application sends this message to the MDI client window to activate the next or previous window |
WM_MDIMAXIMIZE | ||
0x0225 |
The application sends this message to the MDI client window to maximize an MDI child window |
WM_MDITILE | ||
0x0226 |
The application sends this message to the MDI client window to Rearrange all MDI sub-windows in tiling mode |
WM_MDICASCADE | ||
0x0227 |
The application sends this message to the MDI client window to rearrange all MDI child windows in a cascading manner |
|||
WM_MDIICONARRANGE |
0x0228 |
The application sends this message to the MDI client window to rearrange all minimized MDI child windows |
||
WM_MDIGETACTIVE |
0x0229 |
The application sends this message to the MDI client window to Find the handle of the active child window |
||
WM_MDISETMENU |
##0x0230 | The application sends this message to the MDI client window to replace the subwindow's menu with the MDI menu | ||
##0x0231 | When the window enters the move or resize mode loop, send this message to the window | |||
0x0232 | Send this message to the window when it exits the move or resize mode loop | |||
S0x0233 | When the user drags When moving a file, this message | |||
0x0234 |
The application sends this message to the MDI client window to refresh the window menu |
|||
0x02A1 | When the cursor hovers in the window client area for more than the time specified by TrackMouseEvent(), send this message to the window | |||
0x02A3 | When the cursor leaves the window client area for more than the time specified by TrackMouseEvent(), send this message to the window | |||
0x0 | 300App The program sends this message to an Edit Box or ComboBox to delete the currently selected text | |||
0x0301 | The application sends this message to an edit box or ComboBox to copy the currently selected text to the clipboard | ##WM_PASTE | ||
0x0302 |
Applications send this message to an edit box or ComboBox to get data from the clipboard |
|||
WM_CLEAR |
0x0303 |
The application sends this message to an edit box or ComboBox to clear the current selection |
||
WM_UNDO |
0x0304 |
The application sends this message to an Edit Box or ComboBox to undo the last operation |
||
##WM_DESTROY CLIPBOARD |
0x0307 | When EmptyClipboard() is called to clear the clipboard, this message is sent to the clipboard owner | ||
WM_DRAWCLIPBOARD | 0x0308 | This message is sent to the first window in the clipboard watch chain when the contents of the clipboard change. It allows the clipboard watch window to be displayed. New contents of clipboard | ||
WM_PAINTCLIPBOARD | ##0x0309When When the clipboard contains data in the CF_OWNERDIPLAY format and the client area of the clipboard observation window needs to be redrawn, send this message to the clipboard owner | |||
0x030A | When the clipboard contains data in the CF_OWNERDIPLAY format and a vertical scroll bar event occurs in the clipboard observation window, the clipboard observation window sends this message to Clipboard owner | ##WM_SIZECLIPBOARD | ||
0x030B |
When clipping The clipboard viewing window sends this message to the owner of the clipboard when the board contains data in the CF_OWNERDIPLAY format and the size of the client area of the clipboard viewing window has changed |
WM_ASKCBFORMATNAME | ||
##0x030C | The clipboard observation window sends this message to the clipboard owner to obtain the name of the CF_OWNERDISPLAY clipboard format
|
WM_CHANGECBCHAIN | ||
0x030D | When a window observes the chain from the clipboard This message is sent to the first window in the clipboard watch chain when removed | WM_HSCROLLCLIPBOARD | ||
0x030E | When the clipboard contains data in the CF_OWNERDIPLAY format and a horizontal scroll bar event occurs in the clipboard observation window, the clipboard observation window sends this message to the clipboard owner | WM_QUERYNEWPALETTE | ||
0x030F | Send this message to the window that is about to gain keyboard focus. This message gives the window a chance to implement its logical palette when it gains focus. |
|||
WM_PALETTEISCHANGING |
0x0310 |
This message is sent to notify all applications when an application is about to implement its logical palette |
||
WM_PALETTECHANGED |
0x0311 |
The window that gets the focus implements it Send this message to all top-level and overlapping windows after the logical palette to change the system palette |
||
WM_HOTKEY |
0x0312 |
This message is generated when the user presses a hotkey registered by RegisterHotKey() |
||
WM_PRINT |
0x0317 |
The application sends this message to the window, Requests the window to draw itself in the specified device context, usually the printer device context |
||
WM_PRINTCLIENT |
0x0318 |
The application sends this message to the window, requesting the window to draw the window client area in the specified device environment, usually the printer device environment |
||
WM_APP |
0x8000 |
Help users customize messages. Custom messages can be WM_APP+X, X is positive Integer |
||
WM_USER |
0x0400 |
Help users customize messages , the custom message can be WM_USER+X, X is a positive integer |
Message name |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BN_CLICKED |
Click button |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
##BN_DISABLE | Button disabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
##Double click button | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Highlight button | ##BN_PAINT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The button should be redrawn |
BN_UNHILITE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The highlight should be removed |
4. Notification message-combo box
|
The above is the detailed content of Win32 SDK Basics (9) Summary of Windows Common Messages. For more information, please follow other related articles on the PHP Chinese website!