Windows message description

zhaozj2021-02-17  60

The message means a notification issued by Wi N D O W S to tell the application something happens. For example, click the mouse, change the window size, press a key on the keyboard to send Wi N D O W S to the application. The message itself is passed to the application as a record, and this record contains the type of message and other information. For example, for messages generated by clicking on the mouse, this record contains the coordinates when clicking the mouse. This record type is called TM SG, which is declared in the Wi NDOWS unit: Typ etmsg = Packed RecordhWnd: hwnd; / / window handle Message: uint; / / message constant identifier WPARAM: WPA RAM; // 32 Bit message Specific additional information LPARAM: LPA RAM; // 32-bit messages Specific additional information Time: DWORD; / / message creation time Pt: tpoint; / / message creation mouse position END; what is there? Do you feel that the information in a message record is like Greek? If this is the case, then take a look at the explanation below: HWND 32-bit window handle. The window can be any type of screen object because Win32 is able to maintain the handle of most visual objects (windows, dialogs, buttons, edit boxes, etc.). Message is used to distinguish constant values ​​for other messages, which may be predefined in the Windows unit, or they can be custom constants. WPARAM is usually a constant value related to messages or a handle of a window or control. LPARAM is usually a pointer to data in memory. Since W p A r a m, L P A R A M and P O i N t E r are 3 2 bits, so they can be converted between them.

WM_NULL = 0000; WM_CREATE = $ 0001; application creates a window WM_DESTROY = $ 0002; one window is destroyed WM_MOVE = $ 0003; moving a window WM_SIZE = $ 0005; change a window of the size WM_ACTIVATE = $ 0006; one window is activated or lost activation state; WM_SETFOCUS = $ 0007; WM_KILLFOCUS = $ 0008 after getting focus; lost focus WM_ENABLE = $ 000A; change Enable Status WM_SETREDRAW = $ 000B; Settings Window can redraw WM_SETTEXT = $ 000c; the application sends this message to set the text WM_Gettext = $ 000d; application sends this message to copy the text to the buffer wm_gettextLength = $ 000E for the corresponding window; get the length of the text related to a window (not including empty characters) WM_Paint = $ 000F; ask one window to call yourself WM_CLOSE = $ 0010; send a signal WM_QUERYENDSESSION = $ 0011 when a window or application is to be turned off; when the user selects the end dialog or the program you call the exitwindows function wm_quit = $ 0012; used to end the program to run or when the program calls PostquitMessage function wm_quitMessage function wm_quitMessage function WM_QUERYOPEN = $ 0013; When the user window restores the previous size position, send this message to an icon WM_ERASEBKGND = $ 0014; when the window background must be erased (case change the size of the window) WM_SYSCOLORCHANGE = 0015; send this message when the system color changes, send this message Give all top windows WM_ENDSESSION = $ 0016; After the system process issues a WM_QueryEndSession message, this message is sent to the application, informs it to end WM_SYSTEMERROR = $ 0017; WM_SHOWINDOW = $ 0018; When the hidden or display window is sent to this message to this message to this message to the application which window is activated, which is unmatched; WM_FONTCHANGE = $ 001D; when the system's font resource library changes Send this message to all top windows WM_TIMECHANGE = $ 001E; send this message when the system changes to all top-level windows WM_CANCELMODE = $ 001F; send this message to cancel some of the ongoing touch state (operation) WM_SETCURSOR = $ 0020; If the mouse causes the cursor to move in a window and when the mouse input is not captured, send a message to a window WM_MouseActivate = $ 0021; when the cursor is in a non-activated window and the user is in accordance with a key to the mouse The message gives the current window wm_childactivate = $ 0022; send this message to the MDI sub-window When the user clicks on this window, or when the window is activated, move, change the size WM_QUEUESYNC = $ 0023;

This message is sent by a computer-based training program. Separate user input messages wm_getminMaxinfo = $ 0024 via WH_Journalpalyback's hook program; this message is sent to the window When it will change the size or position; WM_PaintICON = $ 0026; Send to minimization window When it is the icon Heavy WM_ICONERASEBKGND = $ 0027; this message is sent to a minimum window, only when it is drawing the icon, its background must be saved WM_NEXTDLGCTL = $ 0028; send this message to a dialog program to change the focus position wm_spoolerstatus = $ 002 A; Whenever the print management column is added or reduced to a job WM_DRAWITEM = $ 002B; when Button, ComboBox, ListBox, MENU can send this message to the owner of these empty parts WM_MEASUREITEM = $ 002c; When Button, Combo Box, List Box, List View Control, or Menu Items are created, send this message to the control owner wm_deleteItem = $ 002d; when the list box or Combo Box is destroyed or when some item is removed by lb_deleteString , LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message WM_VKEYTOITEM = $ 002E; this message is sent to a style LBS_WANTKEYBOARDINPUT its owner in response to WM_KEYDOWN message WM_CHARTOITEM = $ 002F; LBS_WANTKEYBOARDINPUT this message is sent by a list box style to his owner To respond to WM_CHAR messages WM_SETFONT = $ 0030; when the program is drawn, the program is sent to the color wm_getfont = $ 0031 you want to use; the application sends this message to get the current control to draw the text, the text, WM_SETHOTKEY = 0032; the application sends this message to make a window Connected to a hotkey WM_GETHOTKEY = 00 00 33; Application Send this message to determine if the hotkey is associated with association wm_querydragicon = 0037; this message is sent to the minimization window, when this window will be dragged and the icon is not defined in its class, the application can return A handle of an icon or cursor, when the user drags and drop icons, the system displays this icon or cursor WM_CompareItem = $ 0039; send this message to determine the relative position of ComboBox or Listbox added items wm_getObject = $ 003d; wm_compacting = $ 0041; Show memory I rarely wm_windowposchanging = $ 0046; Send this message to the size and location of the window will be changed to call the SETWINDOWPOS function or other window management function wm_windowposchanged = $ 0047; send this message to the size and location of the window has been changed, To call the SETWINDOWPOS function or other window management function wm_power = $ 0048; (for 16-bit Windows) When the system will send this message WM_COPYDATA = $ 004A when the system will enter the pause state; send this when an application passes the data to another application Message WM_CANCELJOURNAL = $ 004B;

When a user cancels the program log activation status, submit this message to the program wm_notify = $ 004e; send this message to its parent window WM_INPUTLANGCHANGEREQUEST = $ 0050 when an event of a control has occurred or this control needs to get some information When the user selects a certain input language, or the hotkey of the input language changes WM_INPUTLANGCHANGE = $ 0051; when the platform has been changed, this message is sent to the affected top window WM_TCARD = $ 0052; when the program has initialized the Windows help routine Send this message to the application WM_HELP = $ 0053; This message shows that the user presses F1. If a menu is activated, send this message and this window is associated with the menu, otherwise send a window with focus, if current Without the focus, send this message to the currently activated window WM_USERCHANGED = $ 0054; send this message to all the windows when the user has logged in or exit, when the user logs in or exits, the system updates the user's specific setup information, in the user update settings When the system immediately sends this message; WM_NOTIFORMAT = 0055; public control, custom control, and their parent window to determine that the control is using ansi or a Unicode structure in the WM_NOTIFY message, using this control to make a control with its father Mutual communication WM_CONTEXTMENU = $ 007b; when the user clicks on a window, send this message to this message for this window WM_StyleChanging = 007c; when the calling setWindowlong function will change this message when you want to change the style of one or more windows Give the window WM_StylechangeD = $ 007d; send this message when the style of the setWindowlong function is called to the window WM_DISPLAYCHANGE = $ 007E; send this message to all Windows WM_GETICON = $ 007F after the resolution of the display changes. This message is sent to a window to return a handle of a large icon or a small icon with a window; wm_seticon = $ 0080; program sends this message to let a new big icon or small icon associated with a window; WM_NCCREATE = $ 0081 This message is in WM_ when a window is created for the first time. Create Message Send before sending; WM_NCDESTROY = $ 0082; This message notifies a window, non-client is destroying WM_NCCALCSIZE = $ 0083; send this message when a window must be asked to send this message WM_NCHITTEST = $ 0084; // Move mouse, press When you live or release your mouse, a WM_NCPAINT = $ 0085; the program sends this message to a window When it (window) must be drawn; wm_ncactivate = $ 0086; This message is sent to a window only when its non-customer area needs to be Change to display is activated or inactive; WM_GETDLGCODE = 0087; send this message to a control associated with the dialog program, widdows control orientation key, and Tab keys make input into this control by responding to WM_GETDLGCODE messages, the application can put him When it is a special input control and can handle it WM_NCMOUSEMOVE = $ 00A0; when the cursor is moving this message to this message when the cursor moves in the non-client area of ​​a window. File: // Non-client is:

The edge of the form of the form and the edge of the window WM_NCLBUTTONDOWN = $ 00A1; when the cursor is pressed at the non-client area of ​​a window, submit this message WM_NCLBUTTONUP = $ 00A2; when the user releases the left mouse button, the point is a window Send this message in the non-client zone; WM_NCLBUTTONDBLCLK = $ 00A3; When the user doubles the left mouse button, the cursor one window sends this message WM_ncrButtondown = $ 00A4; when the user presses the mouse button, the cursor is in the window When the non-client district is sent, WM_NCRBUTTONUP = $ 00a5; when the user releases the mouse button while the cursor is sent this message when the cursor is in the non-client district of the window, WM_NCRBUTTONDBLCLK = $ 00A6; when the user doubles the mouse button, the target is a window in the non-client area ten Send this message wm_ncmbuttondown = $ 00A7; This message wm_ncmbuttondblClk = $ 00A9; When the user doubles the mouse button while the cursor is sent to the window's non-customer district when the window is sent this message WM_KEYFIRST = $ 0100; WM_KEYDOWN = $ 0100;

Next key WM_KEYUP = $ 0101; a key is released WM_CHAR = $ 0102; a key is pressed, and has issued the WM_KEYDOWN, WM_KEYUP message WM_DEADCHAR = $ 0103; sends the message to the window WM_SYSKEYDOWN has the focus when the translation WM_KEYUP message with translatemessage function = $ 0104; Submit this message to the window with the focus when the user presses other keys; WM_SYSKEYUP = $ 0105; when the user releases a button while the Alt key is pressed, submit this message to the window WM_SYSYSCHAR = $ 0106; WM_SYSKEYDOWN message is submitted after TRANSLATEMESSAGE function to translate the message to the window WM_SYSDEADCHAR has focus = $ 0107; send this message when WM_SYSKEYDOWN message after being TRANSLATEMESSAGE function translated to the window WM_KEYLAST has focus = $ 0108; WM_INITDIALOG = $ 0110; is displayed in a dialog program Send this message to it, usually use this message to initialize the control and perform other tasks WM_COMMAND = $ 0111; when the user selects a menu command item or when a control sends a message to its parent window, a shortcut is translated to WM_SYSCOMMAND = $ 0112 When the user selects a command or when the user selects maximizes or minimizes the message WM_TIMER = $ 0113; the timer event WM_HSCROLL = $ 0114; when a window standard horizontal scroll bar generates a rolling event Send this message to that window, also sent to the control WM_VSCROLL = $ 0115; when a window standard vertical scroll bar generates a scrolling event, send this message to that window, send it to the control WM_INITMENU = $ 0116; A menu will be activated to send this message, which occurs in the user's menu strip Some or press a menu button, which allows the program to change the menu WM_INITMENUPOPUP = $ 0117 before display; when a drop-down menu or submenu will be activated, it allows the program to change the menu before it is displayed, not Changing all WM_MENUSELECT = $ 011f; send this message to the menu when the user selects a menu item (general window) WM_MenuChar = $ 0120; when the menu has been activated by the user (different from acceleration keys), Send this message to the owner of the menu; WM_EnterIdle = $ 0121; send this message to the owner of this message when a modal dialog or menu enters an empty-loaded state, a modal dialog or menu enters the no-load state is processing one or several of the previous message from its message queue without waiting WM_MENURBUTTONUP = $ 0122; WM_MENUDRAG = $ 0123; WM_MENUGETOBJECT = $ 0124; WM_UNINITMENUPOPUP = $ 0125; WM_MENUCOMMAND = $ 0126; WM_CHANGEUISTATE = $ 0127;

WM_UPDATEUISTATE = $ 0128; wm_queryuistate = $ 0129; wm_ctlcolormsgbox = $ 0132; Send this message to the owner window of the message box before drawing the message box, by responding to this message, the owner window can be used with the handle of a given related display device Set the text and background color wm_ctlcoloredit = $ 0133; when a edit control will be drawn, send this message to the parent window; by responding to this message, the owner window can be used by the handle of a given related display device. To set the text and background color wm_ctlcolorlistbox = $ 0134; when a list box control will be drawn to the parent window to it; by responding to this message, the owner window can be used by using a given relevant display device The handle to set the text and background color wm_ctlcolorbtn = $ 0135 of the list box; when a button control will be drawn, send this message to its parent window; by responding to this message, the owner window can be used by using a given related display device Handle to set the text and background color wm_ctlcolordlg = $ 0136; when a dialog control is to be drawn, send this message to its parent window; by responding to this message, the owner window can be used by using a given related display device Handle to set the text background color wm_ctlcolorscrollbar = $ 0137; when a scroll strobe control will be drawn; by responding to this message, the owner window can be used by using a given related display device The handle to set the background color wm_ctlcolorstatic = $ 0138 of the scroll bar; when a static control will be drawn, send this message to the parent window; by responding to this message, the owner window can be used by the handle of the given related display device. To set the text and background color wm_mousefirst = $ 0200; WM_MouseMove = $ 0200; // Mobile mouse WM_LButtondown = $ 0201; press the left mouse button WM_LButtonup = $ 0202; release the left mouse left button WM_LButTondblClk = $ 0203; Double-click WM_RBUTTONDOWN = $ 0204; Press the mouse right WM_RBUTTONUP = $ 0205; release of Right WM_RBUTTONDBLCLK = $ 0206; double-click the right mouse button WM_MBUTTONDOWN = $ 0207; mouse button is pressed WM_MBUTTONUP = $ 0208; release the mouse button WM_MBUTTONDBLCLK = $ 0209; double-clicking the mouse Key WM_MOUSEWHEEL = $ 020A; send this message when the mouse wheel is rotated, the current focus control WM_MouseLaseLast = $ 020A; WM_ParentNotify = $ 0210; when the MDI sub-window is created or destroyed, or the user presses the mouse button and the cursor is in the child The message is sent to the parent window for the parent window WM_ENTERMENULOOP = $ 0211;

Send this message to notify the application's main window That has entered menu loop mode WM_EXITMENULOOP = $ 0212; send this message to notify the application's main window That has exited menu loop mode WM_NEXTMENU = $ 0213; wm_sizing = 532; When the user is adjusting the window Hourly sent this message to the window; you can monitor window size and location can also modify them WM_CAPTureChanged = 533; send this message to the window when it lost the captured mouse; WM_MOVING = 534; when the user sent when the user This message can monitor the window size and location can also be modified; wm_powerbroadcast = 536; this message is sent to the application to inform it about power management events; WM_DeviceChange = 537; send this when the hardware configuration changes when the device changes message to the application or device driver WM_IME_STARTCOMPOSITION = $ 010D; WM_IME_ENDCOMPOSITION = $ 010E; WM_IME_COMPOSITION = $ 010F; WM_IME_KEYLAST = $ 010F; WM_IME_SETCONTEXT = $ 0281; WM_IME_NOTIFY = $ 0282; WM_IME_CONTROL = $ 0283; WM_IME_COMPOSITIONFULL = $ 0284; WM_IME_SELECT = $ 0285; WM_IME_CHAR = $ 0286; WM_IME_REQUEST = $ 0288; wm_ime_keydown = $ 0290; wm_ime_keyup = $ 0291; wm_mdicreate = $ 0220; application sends this message to multi-document customer window to create an MDI sub-window WM_MDIDESTROY = $ 0221; the application sends this message to the multi-document customer window to close a MDI sub-window WM_MDIACTIAACTIAAFTE = $ 0222; application sends this message to the multi-document client window to inform the customer window to activate another MDI sub-window, when the customer window After you go to this message, it issues a WM_MDIACTIVE message to activate it to the MDI sub-window (not activated); WM_MDIRESTORE = $ 0223; Program Send this message to the MDI customer window to restore the sub-window from the maximum minimum size WM_MDINEXT = $ 0224; program sends this The message activates the next or the previous window for the MDI Customer window WM_MDIMAXIMIZE = $ 0225; the program sends this message to maximize an MDI sub-window; WM_MDITILE = $ 0226; program sends this message to the MDI customer window to rearrange All MDI sub-windows WM_MDICASCADE = $ 0227; program sends this message to the MDI customer window to rearrange all MDI sub-window WM_MDIICONARRANGE = $ 0228;

The program sends this message to rearrange all the minimized MDI sub-window WM_MDiGetActive = $ 0229; the program sends this message to the MDI customer window to find the handle of the activated sub-window WM_MDisetMenu = $ 0230; program sends this message to the MDI customer window MDI menu instead of the child window's menu WM_ENTERSIZEMOVE = $ 0231; WM_EXITSIZEMOVE = $ 0232; WM_DROPFILES = $ 0233; WM_MDIREFRESHMENU = $ 0234; WM_MOUSEHOVER = $ 02A1; WM_MOUSELEAVE = $ 02A3; WM_CUT = $ 0300; program sends the message to an edit box or combobox to delete the current Selected text wm_copy = $ 0301; program sends this message to a edit box or ComboBox to copy the currently selected text to the clipboard WM_PASTE = $ 0302; the program sends this message to EDITCONTROL or ComboBox gets data from the clipboard WM_CLEAR = $ 0303; program sends This message clears the currently selected content to EditControl or ComboBox; WM_UNDO = $ 0304; program sends this message to editcontrol or ComboBox revoked last operation WM_RENDERFORMAT = $ 0305;

WM_RENDERALLFORMATS = $ 0306; WM_DESTROYCLIPBOARD = $ 0307; When the EnPtyClipboard function is called to send this message to the owner of the clipboard WM_DRAWCLIPBOARD = $ 0308; send this message to the first window of the clipboard to observe the chain when the content changes of the clipboard; it allows Clipboard Watch window to display new content of the clipboard; WM_PaintClipboard = $ 0309; when the clipboard contains data in the CF_OWNERDIPLAY format and the clipboard observation window needs to be heavy; WM_VSCROLLLPBOARD = $ 030A; WM_SIZECLIPBOARD = 030b; when the clipboard contains CF_OWNERDIPLAY format data and the size of the client area of ​​the clipboard observation window has changed that this message is sent to the owner of the clipboard via the clipboard watch window; WM_ASKCBFORMATNAME = $ 030c; send this message to the clipboard through the clipboard watch window Let's request a clipboard of a CF_OWNERDISPLAY format WM_CHANGECBCHAIN ​​= $ 030D; send this message to the first window of the clipboard observe the chain when the window is removed from the clipboard observation chain; WM_HScrollClipboard = $ 030E; this message passes A clipboard observation window sent to the owner of the clipboard; it occurs when the clipboard contains data in the CFOWNERDispaly format and has an event on the horizontal scroll bar of the clipboard viewing window; the owner should scroll the clipboard image and update scrolling The value of the bar; WM_QUERYNEWPALETTE = $ 030f; This message is sent to the window to receive the focus, this message can make the window when you receive the focus, have the opportunity to achieve his logical palette WM_PALETTEISCHANGINGING = $ 0310; when an application is When you implement its logical palette, you send this message to all applications WM_Palettechanged = $ 0311; this message is sent to all top-level and overlapping windows after implementing its logical palette after a window with focus. Change the system palette WM_HOTKEY = $ 0312; submit this message when the user is pressed by the hotkey registered by the RegisterhotKey function; the application sends this message only as part of the request request request request request request requirements ; WM_PRINTCLIENT = 792; WM_HANDHELDFIRST = 856; WM_HANDHELDLAST = 863; WM_PENWINFIRST = $ 0380; WM_PENWINLAST = $ 038F; WM_COALESCE_FIRST = $ 0390; WM_COALESCE_LAST = $ 039F; WM_DDE_FIRST = $ 03E0; WM_DDE_INITIATE = WM_DDE_FIRST 0; a DDE client to submit the message starts a To respond to the specified program and theme name; WM_DDE_TERMINATE = WM_DDE_FIRST 1; a DDE application (whether a customer or server) submits this message to terminate a session; WM_DDE_ADVISE = WM_DDE_FIRST 2; a DDE client program Submit this message to a DDE service program to request the server whenever the data item is changed when the data item changes changes it WM_DDE_UNADVISE = WM_DDE_FIRST 3;

转载请注明原文地址:https://www.9cbs.com/read-30768.html

New Post(0)