Message name |
Value |
Meaning |
Wm_null |
0x0000 |
Empty message, this message will be ignored by the receiving window |
Wm_create |
0x0001 |
Application creates a window |
Wm_destroy |
0x0002 |
A window is destroyed |
Wm_move |
0x0003 |
Move a window |
Wm_size |
0x0005 |
Change the size of a window |
Wm_activate |
0x0006 |
A window is activated or inactive |
Wm_setfocus |
0x0007 |
After gaining focus |
Wm_killfocus |
0x0008 |
Lose focus |
Wm_enable |
0x000A |
Generated when the application Enable state changes |
Wm_setredraw |
0x000b |
Sets whether the window can be redrawn |
Wm_settext |
0x000c |
The application sends this message to set the text of a window |
Wm_gettext |
0x000d |
The application sends this message to copy the corresponding window's text to the buffer |
Wm_gettextlength |
0x000e |
Gets the length of the text associated with a window (does not contain null characters) |
Wm_paint |
0x000f |
require a window to redraw itself |
Wm_close |
0x0010 |
Send a signal when a window or application is about to close |
Wm_queryendsession |
0x0011 |
The user selects the End dialog box or the application calls the ExitWindows function itself |
Wm_quit |
0x0012 |
Used to end a program run or an application calling the PostQuitMessage function to produce this message |
Wm_queryopen |
0x0013 |
Sends this message to an icon when the user window restores the previous size position |
Wm_erasebkgnd |
0x0014 |
When the window background must be erased (for example, when the window changes size) |
Wm_syscolorchange |
0x0015 |
Send this message to all top-level windows when the system color changes |
Wm_endsession |
0x0016 |
When the system process issues a WM_QUERYENDSESSION message, this message is sent to the application |
Wm_showwindow |
0x0018 |
When the hidden or displayed window is sent this message to this window |
Wm_activateapp |
0x001c |
When a window will be activated, the window will be activated and the current activity (about to lose the activation) window will receive this message, sending this message to the application which window is active, which is the inactive |
Wm_fontchange |
0x001d |
This message is sent to all top-level windows when the system's font repository changes |
Wm_timechange |
0x001e |
Send this message to all top-level windows when the system's time changes |
Wm_cancelmode |
0x001f |
Send this message to cancel an operation that is in progress |
Wm_setcursor |
0x0020 |
If the mouse causes the cursor to move through a window and the mouse input is not captured, send a message to the window |
Wm_mouseactivate |
0x0021 |
When the cursor is in a non-activated window and the user is pressing a key on the mouse to send this message to the current window |
Wm_childactivate |
0x0022 |
Send this message to the MDI child window when the user taps the title bar of this window, or when the window is activated, moved, resized |
Wm_queuesync |
0x0023 |
This message is sent by a computer-based training program that separates the user input message from the Wh_journalpalyback Hook program |
Wm_getminmaxinfo |
0x0024 |
When the window is going to change size or position, send this message to the window |
Wm_painticon |
0x0026 |
When the window icon is going to be redrawn, send this message to the window |
Wm_iconerasebkgnd |
0x0027 |
This message is sent to the window when the icon background must be redrawn before the icon in a minimized window is redrawn |
Wm_nextdlgctl |
0x0028 |
Send this message to a dialog box program to change the focus location |
Wm_spoolerstatus |
0x002a |
This message is emitted when a print management queue increases or decreases a job |
Wm_drawitem |
0x002b |
When the appearance of the Button,combobox,listbox,menu control changes, this message is sent to the owner of these controls |
Wm_measureitem |
0x002c |
When the Button,combobox,list box,listview,menu item is created, this message is sent to the owner of the control |
Wm_deleteitem |
0x002D |
When a ListBox or ComboBox is destroyed or when certain items are deleted by sending lb_deletestring, Lb_resetcontent, cb_deletestring, cb_resetcontent messages, Send this message to the owner of the control |
Wm_vkeytoitem |
0x002e |
A ListBox control with a lbs_wantkeyboardinput style sends this message to its owner in response to the WM_KEYDOWN message |
Wm_chartoitem |
0x002f |
A ListBox control with a lbs_wantkeyboardinput style sends this message to its owner in response to the WM_CHAR message |
Wm_setfont |
0x0030 |
When the application draws the control, this message is sent to get the text in the control in which font is drawn |
Wm_getfont |
0x0031 |
The application sends this message to get the font of the current control drawing text |
Wm_sethotkey |
0x0032 |
The application sends this message to have a window associated with a hotkey |
Wm_gethotkey |
0x0033 |
The application sends this message to determine if a hot key is associated with a window |
Wm_querydragicon |
0x0037 |
This message is sent to the minimized window, and when the window is about to be dragged and the icon is not defined in its class, the application returns an icon or a handle to the cursor that the system displays when the user drags and puts the icon |
Wm_compareitem |
0x0039 |
Send this message to determine the relative position of the newly added item in the ComboBox or ListBox |
Wm_compacting |
0x0041 |
Display memory is very low. |
Wm_windowposchanging |
0x0046 |
When the SetWindowPos function is called to change the size and position of the window, send this message to the window |
Wm_power |
0x0048 |
This message is sent to all processes when the system will go into a pending state |
Wm_copydata |
0x004a |
This message is sent when an application passes data to another application |
Wm_canceljournal |
0x004b |
When a user cancels the program Log activation state, this message is sent to the application |
Wm_notify |
0x004e |
Sends this message to its parent window when an event for a control has already occurred or if the control needs to get some information |
Wm_inputlangchangerequest |
0x0050 |
When the user chooses an input language, or the hotkey of the input language changes |
Wm_inputlangchange |
0x0051 |
Send this message to the affected top-level window when the application input language changes |
Wm_tcard |
0x0052 |
Send this message to the application when the application has initialized the Windows help routine |
Wm_help |
0x0053 |
When the user presses F1, if a menu is active, send this message to the menu associated with the window, otherwise it will be sent to the focus window, and if there is no focus, send the message to the currently active window |
Wm_userchanged |
0x0054 |
When the user has logged in or exited to send this message to all windows, when the user logs on or exits the system updates the user's specific settings information, the system sends this message as soon as the user updates the settings |
Wm_notifyformat |
0x0055 |
This message is used by common controls and their parent window to determine whether the structure is in ANSI or UNICODE form in the WM_NOTIFY message, which enables the control to communicate with its parent control |
Wm_contextmenu |
0x007b |
When the user clicks the right button in a window, this message is sent to the window |
Wm_stylechanging |
0x007c |
When you are about to invoke one or more styles of the SetWindowLong function window, send this message to the window |
Wm_stylechanged |
0x007d |
When the call SetWindowLong function changes one or more styles of the window, send this message to the window |
Wm_displaychange |
0x007e |
Send this message to all windows when the resolution of the monitor changes |
Wm_geticon |
0x007F |
Send this message to a window that returns a handle to a large icon or small icon associated with a window |
Wm_seticon |
0x0080 |
The application sends this message to have a new large icon or small icon associated with a window |
Wm_nccreate |
0x0081 |
When a window is first 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 location of a window |
Wm_nchittest |
0x0084 |
Generate this message when you move the mouse, press and hold or release the mouse |
Wm_ncpaint |
0x0085 |
When a window's frame must be drawn, the application sends this message to the window |
Wm_ncactivate |
0x0086 |
This message is sent to a window by changing its non-client area to indicate whether the window is active or inactive |
Wm_ncmousemove |
0x00a0 |
This message is sent to the window when the cursor moves within the window's non-client area (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 |
This message is sent when the cursor is in the non-client area of the window and the left mouse button is released |
Wm_nclbuttondblclk |
0x00a3 |
This message is sent when the cursor is in the non-client area of the window and the left mouse button is double-clicked |
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 |
This message is sent when the cursor is in the non-client area of the window and the middle mouse button is pressed |
Wm_ncmbuttonup |
0x00a8 |
This message is sent when the cursor is in the non-client area of the window and releases the middle mouse button |
Wm_ncmbuttondblcl |
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 (the "ALT" key is not pressed when the key is pressed) |
Wm_keyup |
0x0101 |
Release a non-system key |
Wm_char |
0x0102 |
Press a key to send this message when TranslateMessage forwards Wm_keydown |
Wm_deadchar |
0x0103 |
Release a key, send this message when TranslateMessage forwards Wm_keyup |
Wm_syskeydown |
0x0104 |
Send this message to a window that has keyboard focus when you hold down the ALT key while pressing another key |
Wm_syskeyup |
0x0105 |
Send this message to a window that has keyboard focus when releasing a key while holding down the ALT key |
Wm_syschar |
0x0106 |
Send this message to a window that has keyboard focus when the TranslateMessage function forwards Wm_syskeydown |
Wm_sysdeadchar |
0x0107 |
Send this message to a window that has keyboard focus when the TranslateMessage function forwards Wm_syskeyup |
Wm_initdialog |
0x0110 |
Send this message dialog box before it is displayed, typically using this message to initialize the control and perform other tasks |
Wm_command |
0x0111 |
This message is generated when you select a Window menu item or a control to send a message to its parent window or to press a shortcut key |
Wm_syscommand |
0x0112 |
When you select a Window menu item or select Maximize or minimize, this message is sent to the window |
Wm_timer |
0x0113 |
A timer event has occurred |
Wm_hscroll |
0x0114 |
This message is sent to the owner of the window and scroll bar when the window horizontal scrollbar produces a scrolling event |
Wm_vscroll |
0x0115 |
This message is sent to the owner of the window and scroll bar when the window vertical scrollbar produces a scrolling event |
Wm_initmenu |
0x0116 |
This message is sent when a menu is about to be activated, it occurs when a menu item is pressed, or when a menu shortcut is pressed, which allows the 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, allowing it to be displayed before the menu is modified without having to change the entire menu |
Wm_menuselect |
0x011f |
Send this message to the owner of the menu when a menu item is selected (typically a window) |
Wm_menuchar |
0x0120 |
When the menu is activated and the user presses a key (non-accelerator), the message is sent to the owner of the menu |
Wm_enteridle |
0x0121 |
Sends this message to its owner when a modal dialog box or menu enters an idle state, which means that the message queue is empty after one or several previous messages have been processed |
Wm_menurbuttonup |
0x0122 |
When the cursor is over a menu item, release the right mouse button to generate this message |
Wm_menudrag |
0x0123 |
When you drag a menu item, this message is sent to the owner of the drag-and-drop menu |
Wm_menugetobject |
0x0124 |
Send this message to the owner of the drop-down menu when the cursor moves into the menu item or moves from the center of the menu item to the top or bottom of the item |
Wm_uninitmenupopup |
0x0125 |
This message is generated when the drop-down menu or submenu is destroyed |
Wm_menucommand |
0x0126 |
This message is generated when the user selects a menu item |
Wm_changeuistate |
0x0127 |
The application sends this message indicating that the user interface (UI) state should be changed |
Wm_updateuistate |
0x0128 |
The application sends this message to change the user interface (UI) state of the specified window and its child windows |
Wm_queryuistate |
0x0129 |
The application sends this message to get the user interface (UI) state of a window |
Wm_ctlcolormsgbox |
0x0132 |
Sends this message to its parent window before the message box is drawn, and in response to this message, the parent window can set the text and background color of the message box by using the handle of the given related display device |
Wm_ctlcoloredit |
0x0133 |
Sends this message to its parent window before drawing the edit control, which can be used to set the text and background color of the edit box |
Wm_ctlcolorlistbox |
0x0134 |
Sends this message to its parent window before drawing the ListBox control, which can be used to set the text and background color of the edit box |
Wm_ctlcolorbtn |
0x0135 |
Sends this message to its parent window before drawing the button control, which can be used to set the text and background color of the edit box |
Wm_ctlcolordlg |
0x0136 |
Sends this message to its parent window before drawing the dialog box, which can be used to set the text and background color of the edit box |
Wm_ctlcolorscrollbar |
0x0137 |
Sends this message to its parent window before drawing the scrollbar control, which you can use to set the text and background color of the scroll bar control |
Wm_ctlcolorstatic |
0x0138 |
Sends this message to its parent window before drawing a static control, which can be used to set the text and background color of a static control |
Wm_mousemove |
0x0200 |
Mouse movement |
Wm_lbuttondown |
0x0201 |
Press the left mouse button |
Wm_lbuttonup |
0x0202 |
Release left mouse button |
Wm_lbuttondblclk |
0x0203 |
Double click left mouse button |
Wm_rbuttondown |
0x0204 |
Press the right mouse button |
Wm_rbuttonup |
0x0205 |
Release the right mouse button |
Wm_rbuttondblclk |
0x0206 |
Double-click the right mouse button |
Wm_mbuttondown |
0x0207 |
Press the middle mouse button |
Wm_mbuttonup |
0x0208 |
Release middle mouse button |
Wm_mbuttondblclk |
0x0209 |
Double-click the middle mouse button |
WM_MouseWheel |
0x020a |
Sends this message to the currently focused window when the mouse wheel is rotated |
Wm_parentnotify |
0x0210 |
When the MDI child window is created or destroyed, or when the cursor is over a child window and the user presses the mouse button, the message is sent to its parent window |
Wm_entermenuloop |
0x0211 |
Send this message to notify the application that the main window process has entered the menu mode loop |
Wm_exitmenuloop |
0x0212 |
Send this message to notify the application that the main window process has exited the menu mode loop |
Wm_sizing |
0x0214 |
Adjust window Large hours send this message to the window through which the application can monitor or modify the window size and position |
Wm_capturechanged |
0x0215 |
When the window is set to not capture mouse events, this message is sent to the window |
Wm_moving |
0x0216 |
When you move a window, this message is sent to the window through which the application can monitor or modify the window size and position |
Wm_powerbroadcast |
0x0218 |
Send this message to the application to notify it about power management events |
Wm_devicechange |
0x0219 |
Send this message to the application or device driver when the device's hardware configuration changes |
Wm_mdicreate |
0x0220 |
The application sends this message to a multi-document client window to create an MDI child window |
Wm_mdidestroy |
0x0221 |
The application sends this message to a multi-document client window to close an MDI child window |
Wm_mdiactivate |
0x0222 |
The application sends this message to the multi-document Customer window to notify the client window to activate another MDI child window, and when the client window receives this message, it issues a wm_mdiactive message to the MDI child window (not activated) to activate it |
Wm_mdirestore |
0x0223 |
The application sends this message to the MDI client window to notify the child window to revert 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 re-arrange all MDI child windows in a tiled manner |
Wm_mdicascade |
0x0227 |
The application sends this message to the MDI client window to cascade all MDI child windows |
Wm_mdiiconarrange |
0x0228 |
The application sends this message to the MDI client window to rearrange all the minimized MDI child windows |
Wm_mdigetactive |
0x0229 |
The application sends this message to the MDI client window to find the handle to the active child window |
Wm_mdisetmenu |
0x0230 |
The application sends this message to the MDI client window using the MDI menu instead of the child window's menu |
Wm_entersizemove |
0x0231 |
This message is sent to the window when the window enters the move or changes the size mode loop |
Wm_exitsizemove |
0x0232 |
This message is sent to the window when the window exits the move or changes the size mode loop |
Wm_dropfiles |
0x0233 |
This message is generated when a user drags a file in the application window |
Wm_mdirefreshmenu |
0x0234 |
The application sends this message to the MDI client window to refresh the Window menu |
Wm_mousehover |
0x02a1 |
When the cursor hovers over the window client area beyond the time specified by the TrackMouseEvent function, this message is sent to the window |
Wm_mouseleave |
0x02a3 |
This message is sent to the window when the cursor leaves the window client area longer than the time specified by the TrackMouseEvent function |
Wm_cut |
0x0300 |
The application sends this message to an edit box or ComboBox to delete the currently selected text |
Wm_copy |
0x0301 |
The application sends this message to an edit box or ComboBox to copy the currently selected text to the Clipboard |
Wm_paste |
0x0302 |
The application sends this message to an edit box or ComboBox to get the data from the Clipboard |
Wm_clear |
0x0303 |
The application sends this message to an edit box or ComboBox to clear the currently selected content |
Wm_undo |
0x0304 |
The application sends this message to an edit box or ComboBox to undo the last action |
Wm_destroyclipboard |
0x0307 |
When the EmptyClipboard function is called to empty the Clipboard, this message is sent to the clipboard owner |
Wm_drawclipboard |
0x0308 |
When the contents of the Clipboard are changed, this message is sent to the first window in the Clipboard Watch chain, which allows the Clipboard viewing window to display new contents of the Clipboard |
Wm_paintclipboard |
0x0309 |
This message is sent to the Clipboard owner when the Clipboard contains data in Cf_ownerdiplay format and the client area of the Clipboard Watch window needs to be redrawn |
Wm_vscrollclipboard |
0x030a |
When the Clipboard contains Cf_ownerdiplay formatted data and the Clipboard Watch window has a vertical scrollbar event, the Clipboard Watch window sends this message to the Clipboard owner |
Wm_sizeclipboard |
0x030b |
When the Clipboard contains data in cf_ownerdiplay format and the size of the client area of the Clipboard Watch window has changed, the Clipboard Watch window sends this message to the owner of the Clipboard |
Wm_askcbformatname |
0x030c |
Clipboard Watch Window sends this message to the Clipboard owner to get the name of the Cf_ownerdisplay Clipboard format |
Wm_changecbchain |
0x030d |
Send this message to the first window in the Clipboard watch chain when a window is removed from the Clipboard watch chain |
Wm_hscrollclipboard |
0x030e |
The Clipboard Watch window sends this message to the Clipboard owner when the Clipboard contains Cf_ownerdiplay formatted data and the Clipboard Watch window has a horizontal scrollbar event |
Wm_querynewpalette |
0x030f |
Send this message to the window that will get the keyboard focus, which gives the window a chance to implement its logical palette while gaining focus |
Wm_paletteischanging |
0x0310 |
The application will implement its logical palette when sending this message to notify all applications |
Wm_palettechanged |
0x0311 |
The window that gets the focus implements its logical palette after sending this message to all top-level and overlapping windows to change the system palette |
Wm_hotkey |
0x0312 |
This message is generated when the user presses a hotkey registered by the RegisterHotKey function |
Wm_print |
0x0317 |
The application sends this message to the window, requiring the window to draw itself in the specified device environment, typically the printer device environment |
Wm_printclient |
0x0318 |
The application sends this message to the window, requiring the window to draw windows in the specified device Environment client area, typically the printer device environment |
Wm_app |
0x8000 |
Help users customize messages, custom messages can be wm_app+x,x as positive integers |
Wm_user |
0x0400 |
Help users customize messages, custom messages can be wm_user+x,x as positive integers |