The message means a notification issued by Windows to tell the application a matter. For example, click the mouse, change the window size, press a key on the keyboard to send Windows to your 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 TMSG,
It is this declared in the Windows unit: Type TMSG = Packed Record HWnd: hwnd; / / window handle Message: uint; / / message constant identifier WPARAM: WPARAM; // 32-bit message Specific additional information LParam: lparam; // 32-bit messages Time: DWORD; / / message creation time PT: TPOINT; / / message creation mode position END;
What is there in the news? 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 this message WM_ACTIVATEAPP = $ 001c; Send this message Which window is activated, which is not activated; WM_FONTCHANGE = 001D; send this message when the system's font resource library changes this message to all top windows WM_TIMECHANGE = $ 001E; When the time change is sent 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 is moved in a window and the mouse input is not captured When you send a message to a window WM_MouseActivate = $ 0021; When the cursor is in a non-activated window and the user is in pressing a key in a mouse to send this message to 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_QUEESYNC = 0023; this message is sent by the computer-based training program, separating the user input message wm_getminMaxInfo = $ 0024 via the HOOK program of WH_Journalpalyback Give the window When it will change the size or position; WM_PaintICON = $ 0026; Send to Minimize Window When it is the icon to be edited WM_ICONERASEBKGND = $ 0027; this message is sent to a minimum window,
Only when it is drawn, it must be redrawed by WM_NEXTDLGCTL = $ 0028; send this message to a dialog program to change the focus position wm_spoolersTatus = $ 002a; Whenever the print management column increases or decreases this message WM_DRAWITEM = 002b; When the visual appearance of Button, ComboBox, ListBox, send this message to these empty owners WM_MeasureItem = $ 002c; when Button, Combo Box, List Box, List View Control, Or Menu Item Send this message to the owner of the control WM_DELETEITEM = $ 002d; when the list box or Combo Box is destroyed or when some item is removed through lb_delected, or cb_resetcontent message WM_VKEYTOITEM = 002E; this message has one The LBS_WANTKEYBOARDINPUT style is sent to it to respond to the WM_KeyDown message WM_CHARTOITEM = $ 002f; this message is sent to his owner by a list box of LBS_WANTKEYBOARDINPUT style to respond to WM_CHAR messages WM_SETFONT = $ 0030; when drawing text, the program is sent this message The color wm_getfont = $ 0031; the application sends this message to get the current control to draw the text of the text WM_SETHOTKEY = $ 0032; the application sends this message to let a window associated with a hotkey WM_GETHOTKEY = $ 0033; application sends this message to determine The hotkey is associated with a window WM_QueryDragicon = $ 0037; this message is sent to the minimized window, when this window will be dragged and dropped, the application can return an icon in its class, the application can return an icon or cursor handle, when a user When drag and drop icon, 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 has 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 SetWindowPos function or other window when the size and location of the window have been changed. Manage function wm_power = $ 0048; (for 16-bit Windows) When the system will send this message WM_COPYDATA = $ 004A when the system will enter the paused state; send this message when an application delivers data to another application WM_CANCELJournallNal = 004B; 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 This message gives the application WM_HELP = $ 0053; this message shows that the user presses F1, if a menu is activated,
Just send this message, this window is associated with the menu, otherwise send it to the focus window. If there is no focus, you will send this message to the current activation window WM_UserChanged = $ 0054; send this message when the user has logged in or exited Give all the windows, when the user logs in or exits, the system updates the user's specific setting information, the system will send this message immediately when the user update settings; WM_NOTIFORMAT = $ 0055; public control, custom control, and their parent window to judge The control is to use ANSI or the Unicode structure in the WM_NOTIFY message, using this control to communicate with each other with its parent controls WM_CONTEXTMENU = 007b; when the user clicks on a window, send this message to this message. Window WM_StyleChanging = 007c; When the calling setWindowlong function will change this message to the window WM_Stylechanged = $ 007D when the SETWINDOWLONG function is changed; when calling the setWindowlong function one or more windows, send this message to that window WM_DISPLAYCHANGE = 007E; Send this message to all windows wm_geticon = $ 007f after the resolution change changes; this message is sent to a window to return to a large icon or a small icon for a window; wm_seticon = $ 0080 The program sends this message to let a new big icon or small icon associate with a window; WM_NCCREATE = $ 0081; When a window is created first, this message is sent before the WM_CREATE message is sent; WM_NCDESTROY = 0082; this message Informing a window, the non-client area is destroying WM_NCCALCSIZE = $ 0083; send this message when a window must be asked to send this message WM_NCHITTEST = $ 0084; / / Move the mouse, hit or release the mouse when the mouse is sent to the mouse, WM_NCPAINT = $ 0085; program sends This message gives a window when it (windows) must be drawn; wm_ncactivate = $ 0086; This message is sent to a window only when its non-client area needs to be changed to display is activated or inactive; wm_getdlgcode = $ 0087; Send this message to a control associated with the dialog program, the Widdows Control orientation button and Tab keys make the input into this control by responding to the WM_GETDLGCODE message, the application can treat him as a special input control and can handle it WM_NCMOUSEMOVE = $ 00A0; When the cursor is transmitted when the cursor is moving in a window to move this message to this window // Non-customer area: Form's title bar and window of the edge of the window WM_NCLBUTTONDOWN = $ 00A1; as cursor in one window When the non-customer zone simultaneously presses the left mouse button, this message is submitted to this message WM_NCLBUTTONUP = $ 00a2; when the user releases the left mouse button, the cursor is sent in the non-client zone ten; wm_nclbuttondblclk = $ 00A3; when the user doubles the left mouse button At the same time, a window sent this message in a non-customer zone 10 for the non-client district 10; when the user presses the mouse button, the cursor is sent to the window's non-client district, WM_NCRBUTTONUP = $ 00A5; when the user releases the mouse button, the cursor Send this message when the window is in the non-client district; when the user doubles the mouse button, the spectrum is sent in the non-customer zone 10, the message is sent this message wm_ncmbuttondown = $ 00A7; when the user presses the mouse button while the cursor is in the window This message is sent when the non-client district is sent to WM_NCMBUTTONUP = $ 00A8;
When the user releases the mouse button while the cursor is sent to the window's non-client district when the window is sent this message WM_NCMBUTTONDBLCLK = $ 00A9; ; // Press a key WM_KEYUP = $ 0101; // Release a key WM_CHAR = $ 0102; // Press a key and have issued WM_KEYDOWN, WM_KEYDOWN, WM_DEADCHAR = $ 0103; send this message when translating the WM_KEYUP message with TranslateMessage functions Have a focus window WM_SYSKEYDOWN = $ 0104; submit this message to the window with focus when the user holds down the alt button; WM_SYSKEYUP = $ 0105; when the user releases a button while the ALT button is saved to have this message focus window WM_SYSCHAR = $ 0106; when WM_SYSKEYDOWN message after being TRANSLATEMESSAGE function translated submitting this message to the window WM_SYSDEADCHAR has focus = $ 0107; when WM_SYSKEYDOWN message is transmitted this message TRANSLATEMESSAGE function translated to a window with the focus WM_KEYLAST = $ 0108; WM_INITDIALOG = $ 0110 This message is sent to it before a dialog program is displayed, which usually uses 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 key is translated WM_SYSCOMMAND = $ 0112; when the user selects a command to select the window menu or when the user selects maximizes or minimizes the message WM_TIMER = $ 0113; // The timer event WM_HSCROLL = $ 0114; A window standard horizontal scroll bar generates a scrolling event to send this message to that window, also sent to the control WM_VSCROLL = $ 0115 with its control; when a window standard vertical scroll bar generates a scrolling event to send this message to that window, send Give it a control WM_INITMENU = $ 0116; when a menu will be activated, it will send this message in the user menu bar or pressed a menu button, which allows the program to change the menu WM_INITMENUPOPUPUPUP = $ 0117; As a down The pull menu or submenu will be sent to send this message when it is activated, which allows the program to change the menu before it is displayed, not to change all WM_MENUSELECT = 011f; send this message to the menu when the user selects a menu item (generally Window) WM_MenuChar = $ 0120; When the menu has been activated by the user (different from the acceleration key), send this message to the owner of the menu; WM_EnterIdle = $ 0121; when a modal dialog or menu enters an empty state When you send this message to its owner, a modal dialog or menu enters the no-load status is to wait for one or more previous messages, there is no message to wait for WM_MenurButtonup = $ 0122; wm_menudrag = $ 0123; wm_MenugetObject = $ 0124; wm_uninitMenupopupup = $ 0125; wm_menucommand = $ 0126; wm_changeuistate = $ 0127; wm_updateuistate = $ 0128; wm_quryuistate = $ 0129; wm_ctlcolormsgbox = $ 0132;