Good things, description of Windows messages

xiaoxiao2021-03-06  110

Good things, description of Windows messages

2004-5-15 2:17:17 (Article Category: Delphi)

 This is what I saw on the big rich, I feel very good, I have a sharing, the author forgets what is called, here to say Sorry to this article, if there is a chance to learn the author name, must I finally got SPY , I don't need to install VC. You don't need to install it. Cool, 20K after compression, you need to ask Mail.  If you think these things are useful to you, please UP, let more people know:) ********************************************** ************************************************ Refers to a notification issued by Wi NDOWS to tell the application The program has happened. 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 creation a window WM_DESTROY = $ 0002; a window is destroy WM_MOVE = $ 0003; moving a window WM_SIZE = $ 0005; change the size of a window WM_Activate  = $ 0006; a window is activated or lost to the activation status; WM_SETFOCUS  = $ 0007; get focus After WM_KILLFOCUS = $ 0008; lost focus WM_ENABLE = $ 000A; change Enable status WM_SETREDREDRAW = $ 000B; Settings window can redraw WM_SETTEXT  = $ 000c; application sends this message to set the text WM_GETTEXT = $ 000d; the application sends this message to copy the text to the buffer of the corresponding window WM_GETTEXTLENGTH = $ 000E; get The length of the text related to a window (does not include empty characters) WM_PAINT = $ 000F; ask a window to call yourself WM_close  = $ 0010; when a window or application is to close Send a signal WM_QUERYENDSESSION = $ 0011; When the user selects the end dialog or the program you call the exitwindows function WM_quit = $ 0012; used to end the program run or when the program calls postquitMessage 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 (the case change the size of the size) WM_SYSCOLORCHANGE = $ 0015 When the system color changes, it sends this message to all top-level windows WM_ENDSESSION  = $ 0016; After the system process issues a WM_QueryEndSession message, this message is sent to the application, informs whether the conversation ends WM_SYSTEMERROR = $ 0017; WM_SHOWINDOW  = $ 0018; When the hidden or display window is sent to this message to this message WM_ACTIVATEAPP = $ 001c; send this message to the application which window is activated, which is not activated; WM_FONTCHANGE  = $ 001D; When the system's font resource library changes, this message is sent to all top windows WM_TIMECHANGE  = $ 001; send this message when the system changes to all top windows WM_CANCELMODE = $ 001F; send This message cancels 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-active window and the user is in accordance with a key in the 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 The title bar, or when the window is activated, moved, change the size WM_QUEESYNC = = $ 0023; This message is sent by the computer-based training program, separated by the WH_Journalpalyback hook program separated by the user input message WM_GETMAXINFO  = $ 0024; this Message Send to the window When it will change the size or position; WM_PAINTICON  = $ 0026;

Send to the minimization window When it icon will be swapped WM_ICONERASEBKGND = $ 0027;  This message is sent to a minimized window, only when it is drawing the icon, its background must be redrawn 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;  Button, ComboBoX When the visual appearance of ListBox, this message is sent to the owner of these empty parts WM_MeasureItem  = $ 002c; when Button, Combo Box, List Box, List View Control, or Menu Item is created Message to the owner of the control WM_DELETEITETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETETED; 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 has a LBS_WANTKEYBOARDINPUT style to give it the owner to respond to the WM_KeyDown message WM_CHARTOITEM  = $ 002F; this message is sent by a list box of LBS_WANTKEYBOARDINPUT style to his owner to respond to WM_CHAR messages WM_SETFONT   = $ 0030; When the program is drawn, the program sends this message to get the color WM_GETFONT = $ 0031; the application sends this message to get the current control to draw the text font WM_SETHOTKEY = $ 0032; Application Send this message allows a window to associate with a hotkey WM_GETHOTKEY = = $ 0033; the application sends this message to determine if the hotkey is associated with a window WM_QueryDragicon = $ 0037; this message Send to the minimization window, when this window will be drag and drop and its class is not defined in the class, the application can return a handle of an icon or cursor, when the user drags 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_G ETOBJECT  = 003d; WM_compacting  = $ 0041; Show memory has rare WM_WindowPoschanging = $ 0046; send this message to the size and location of the window to be changed, call the setWindowPos function or other window Manage function WM_WINDOWPOSCHANGED = $ 0047; Send this message to the size and location of the window to call the SETWINDOWPOS function or other window management function WM_Power  = $ 0048; (for 16-bit Windows) This message is sent this message when the system will enter the pause state =WM_copydata = $ 004a; send this message when an application delivers data to another application WM_CANCELJOURNAL = $ 004B; when a user cancels log log Activate state, 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 change of the input language change 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 is sent to the application WM_HELP   = $ 0053; This message shows that the user presses F1. If a menu is activated, send this message and this message is associated with the menu, otherwise send a window with focus, if there is no focus, The message is sent to the currently activated window WM_UserChanged WM_UserChanged  = $ 0054; send this message to all windows when the user has logged in or exits, when the user logs in or exits, the system updates the user's specific setting information, when the user update the setting I will send this message immediately; 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 it Mutual communication between the parent control WM_CONTEXTMENU  = 007b; When the user clicks on a window, send this message to this message to this message WM_StyleChanging  = $ 007c; When the calling setWindowlong function will change one or more When the window is sent to the window WM_StylechangeD = $ 007d; send this message after the style of the setWindowlong function one or more windows, send this message to that message WM_DISPLAYCHANGE = $ 007E; when the display is resolution After changing the message, send this message to all windows WM_GETICON = $ 007f; this message is sent to a window to return a big icon or small icon for a window; WM_seticon   = $ 0080; Program Send 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 Send; WM_NCDESTROY = $ 0082; This message notifies a window, non-customer area is destroying WM_nccalcsize  = $ 0083; when a window's customer area must be asked to send this message WM_nchittest  = $ 0084; // Move the mouse, when you hold down or release the mouse, WM_NCPAINT = $ 0085; program sends this message to a window When it (window) frame must be drawn; WM_ncactivate   = $ 0086; This message is sent to a window It is only when its non-client area needs to be changed to display whether it is activated or an activation state; WM_GETDLGCODE  = $ 0087; send this message to a control associated with the dialog program, Widdows control orientation key, and Tab keys Enter 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; send this message to this message when the cursor moves in a window's non-client mobile  // Non-customer area is: the title bar and window of the form  Border WM_NCLBUTTONDOWN = $ 00A1; When the cursor is in a window When the client area is pressed, press the left button to submit this message WM_nclButtonup = $ 00A2; When the user releases the left mouse button, the cursor is sent to the non-client zone ten; WM_nclButtondblclk = $ 00A3; when the user Double-click the left mouse button and the cursor one window sends this message in the non-client zone 10 WM_ncrbuttondown = $ 00A4;

When the user presses the mouse button while the cursor is sent to the window's non-client district when the window is sent this message WM_ncrButtonup = $ 00A5; when the user releases the mouse button, the cursor is sent to the window in the non-customer area of ​​the window, the message is sent to the message WM_ncrbuttondblclk = $ 00A6; When the user doubles the mouse button, the spectrum is sent in the non-client zone 10. WM_ncmbuttondown  = $ 00A7; When the user presses the mouse button while the cursor is also sent to the window of the window to send this message WM_NCMBUTTONUP = $ 00A8; When the user releases the mouse button while the cursor is in the non-client district of the window, this message is sent this message when the window is in the non-client district. WM_NCMBUTTONDBLCLK = $ 00A9; when the user doubles the mouse button while the cursor is in the window of the window Send this message WM_KEYFIRST = $ 0100; wm_keydown  = $ 0100;  // Press a key WM_KEYUP = = $ 0101;  // Release a key  WM_CHAR = $ 0102;  // Press a key and have issued WM_KEYDOWN, WM_KEYUP message WM_DEADCHAR  = $ 0103; Send this message when translating the WM_KEYUP message with the TranslateMessage function to send this message to the window WM_SYSKEYDOWN = $ 0104; Focus window; WM_SYSKEYUP = $ 0105; When the user releases a button while the Alt key is pressed, this message is submitted to the window of the focus WM_SYSCHAR  = $ 0106; when the WM_SYSKEYDOWN message is translated by the translateMessage function After submitting this message to the window WM_SYSDEADCHAR = $ 0107; when the wm_syskeydown message is translated by the translateMessage function, send this message to the window of the focus WM_KEYLAST = $ 0108; WM_INITDIALOG  = $ 0110 The message is sent to it before a dialog program is displayed, which is usually used 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 Give it a parent window, a shortcut is translated WM_sysCommand = $ 0112; when the user selects a command or when the user When you choose to maximize or minimize the message, the window will receive this message WM_TIMER  = $ 0113;  / / Timer event WM_HSCROLL = $ 0114; When a window standard horizontal scroll bar generates a scrolling event to send this message to that window, also sent to control WM_VScroll = $ 0115; when a window standard vertical scroll bar generates a scroll event The message is also sent to the window, and the control is sent to the control WM_INITMENU = $ 0116; when a menu will be activated, it will send this message, which occurs in a user menu bar or presses a menu button. It 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 to change all WM_MENUSELECT = $ 011 F; When the user selects a menu item, send this message to the owner of the menu (usually 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 the owner when a modal dialog or menu enters an empty state,

A modal dialog or menu enters the no-load status is to wait for one or more previous messages, there is no message, it is waiting for 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; draw message box windows Before sending this message to the owner window of the message box, by responding to this message, the owner window can set the text and background color WM_CTLCOLOREDIT  = $ 0133 by using the handle of a given related display device. The editing control will be drawn to the parent window to send this message; by responding to this message, the owner window can set the edit box for text and background color WM_CTLCOLORLISTBOX WM_CTLCOLORLISTBOX WM_CTLCOLOSTBOX = $ 0134 When a list box control will send this message to the parent window to send this message before being drawn; by responding to this message, the owner window can set the list box for text and background color wm_ctlcolorbtn  设置 by using the handle of a given related display device.  = $ 0135; When a button control will send this message to the parent window; by responding to this message, the owner window can set the text and background with the handle of the given related display device. Color WM_CTLCOLORDLG = $ 0136; When a dialog control will send this message to its parent window before being drawn; by responding to this message, the owner window can set the conversation by using the handle of a given relevant display device. Box text background color WM_CTLCOLORSCROLLBAR = $ 0137; When a scroll strip control will send this message to the parent window; by responding to this message, the owner window can be set by using the handle of the given related display device. Background color WM_CTLCOLORSTAIC  = $ 0138;  When a static control will be drawn, send this message to its parent window; by responding to this message, the owner window can be used by the handle of the given display device. Set the text and background color of the static control WM_Mousefirst = $ 0200; WM_MOUSEMOVE  = $ 0200;  //    WM_LBUTTONDOWN  = $ 0201;  // Press the left mouse button WM_LBUTTONUP = $ 0202;   // Release the left mouse left button WM_LBUTTONDBLCLK = $ 0203;  // Double click the left mouse left button WM_RBUTTONDOWN = $ 0204;   // Press the right mouse button WM_RBUTTONUP  = $ 0205;  // Release mouse right button WM_RBUTTONDBLCLK = $ 0206;  // Double click on the mouse Right button WM_MBUTTONDOWN  = $ 0207;  // Press the mouse button WM_MBUTTONUP  = $ 0208;  // Release mouse button WM_MBUTTONDBLCLK   = $ 0209;  / / Double click on the mouse button WM_Mousewheel  = $ 020A; send this message when the mouse wheel is rotated, the current focus control WM_MouseLast = $ 020 A; WM_ParentNotify  = $ 0210; when the MDI sub-window is created or destroyed,

Or the user presses the mouse button and the cursor sends this message to its parent window WM_EnterMenuloop = $ 0211; send this message to notify the application's main window That has entered the 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, send this message to the window; This message application can monitor window sizes and locations can also be modified; send this message to the window When it lost the captured mouse; WM_MOVING = 534; when the user is moving the window Send this message, you can monitor the window size and location can also be modified; WM_powerbroadcast = 536; This message is sent to the application to notify it about power management events; WM_DEviceChange  = 537; When the hardware configuration changes, this message is sent to the application or device driver WM_IME_STARTCOMPSITION = = $ 010d; WM_IME_ENDComposition  = $ 010E; WM_IME_COMPSITION = = $ 010f; WM_IME_KEYLAST   = $ 010f; WM_IME_SETCONTEXT = $ 0281; WM_IME_NOTIFY  = $ 0282; WM_IME_CONTROL = $ 0283; WM_IME_COMPSITIONFULL = $ 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 the multi-document customer window to create A MDI sub-window WM_MDIDESTROY  = $ 0221; the application sends this message to the multi-document customer window to close a MDI sub-window WM_MDIACTIVATE  = $ 0222; application The program sends this message to inform the client window to activate another MDI sub-window, after the customer window receives this message, it gives the MDI sub-window (not activated) to activate it; WM_MDIRESTORE  = $ 0223; Program Send this message to the MDI Customer window to restore the sub-window from the maximum minimization to the original size WM_MDINEXT = $ 0224; program sends this message to the MDI customer window to activate the next or the previous window WM_MDIMAXIMIZE   = $ 0225; Program Send this message to MDI customer window to maximize an MDI sub-window; WM_MDITILE = $ 0226; program sends this message to the MDI customer window to rearrange all MDI sub-window WM_MDICASCADE  = $ 0227; Program Send this message to the MDI customer window rearrange all MDI sub-window WM_MDIICONARRANGE = $ 0228; program sends this message to the MDI customer window Replace all minimized MDI sub-window WM_MDIGETACTIVE  = $ 0229; Program Send this message to the MDI customer window to find the handle of the activated sub-window WM_MDisetMenu = $ 0230;

The program sends this message to the MDI customer window with the MDI menu instead of the menu of the child window WM_ENTERSIZEMOVE  = $ 0231; WM_EXITSIZEMOVE  = $ 0232; WM_DROPFILES  = $ 0233; WM_MDIREFRESHMENU = = $ 0234; WM_Mousehover  = $ 02A1; WM_MouseLeave  = $ 02A3; WM_CUT = $ 0300; program sends this message to an edit box or ComboBox to delete the currently selected text WM_COPY = $ 0301; Program Send this message to a edit box or ComboBox to copy the currently selected text to the clipboard WM_PASTE  = $ 0302; program sends this message to EditControl or ComboBox gets data from the clipboard WM_CLEAR   = $ 0303; Program Send this message to clear the currently selected content to EditControl or ComboBox; WM_UNDO  = $ 0304; Program Send this message to editcontrol or comboBox revoke last Operation WM_Renderformat = $ 0305 WM_RENDERALLFORMATS = $ 0306; WM_DESTROYCLIPBOARD = $ 0307; send this message to the owner of the clipboard to the owner of the clipboard WM_DRAWCLIPBOARD = $ 0308 when calling the enptyclipboard function; send this message to the clipboard observation chain when the content changes of the clipboard Window; it allows the window to display the window to display the 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_VScrollClipboard = $ 030A; WM_SIZECLIPBOARD = $ 030B; When the clipboard contains data in the CF_OWNERDIPLAY format and the size of the clipboard observation window has changed this message is sent to the owner of the clipboard by clipboard watch window; WM_ASKCBFORMATNAME = $ 030c This message is sent to the owner of the clipboard to the owner of the clipboard to request a clipboard of the clipboard to request a clipboard of the clipboard. Plan view The first window of the chain; WM_HSCROLLLPBOARD = $ 030E; this message sends the owner of the clipboard through a clipboard watch window; it occurs when the clipboard contains data in the cfownerdispaly format and has an event on the clipboard viewing window The horizontal scroll bar; the owner should scroll the clipboard image and update the value of the scroll bar; WM_QUERYNEWPALETTE = $ 030F; This message is sent to the window to receive the focus, this message can make the window when receiving the focus Have the opportunity to achieve his logical palette WM_PALETTEISCHANGING = $ 0310; when an application is to implement its logical palette, send this message to notify all applications WM_Palettechanged = $ 0311; this message is in a window with focus Realize its logical palette, send this message to all top-level and overlapping windows to change the system palette WM_hotKey = $ 0312; when the user presses the hotkey registered by the RegisterhotKey function This message is WM_PRINT = 791; Application Send this message only as part of the application is drawn only when Windows or other applications issues a request to draw a request; 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 submits this message to start a session of the server 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 one Session; WM_DDE_ADVISE = WM_DDE_FIRST 2; a DDE client submits this message to a DDE service program to request the server whenever the data item changes when the data item changes it WM_DDE_UNADVISE = = WM_DDE_First 3; a DDE client passer Message Notifies a DDE Service Upon not update the specified item or a special clipboard format item WM_DDE_ACK = = WM_DDE_FIRST 4; this message notifies a DDE (Dynamic Data Exchange) program has received and is processed WM_DDE_POKE , WM_DDE_EXECUTE, WM_DDE_DATA, WM_DDE_ADVISE, WM_DDE_UNADE_ADVISE, WM_DDE_UNADVISE, or WM_DDE_INITIAT message WM_DDE_DATA = WM_DDE_FIRST 5; a DDE service program submits this message to the DDE client to pass a data item to a customer or notify the customer's available data item WM_DDE_REQUEST = WM_DDE_FIRST 6; a DDE client submits this message to a DDE service program to request a value of a data item; WM_DDE_POKE = WM_DDE_FIRST 7; a DDE client submits this message to one DDE service, customer uses this message to request the server to receive an unadiable data item; the server passes the answer WM_DDE_ACK message prompt whether it receives this data item; WM_DDE_EXECUTE = WM_DDE_FIRST 8; a DDE client submit this message Give a DDE service program to send a string to the server to let it be in the serial command, the server responds by submitting the WM_DDE_ACK message; WM_DDE_LAST = WM_DD E_FIRST 8; WM_APP = $ 8000; WM_USER = $ 0400; this message can help application custom private messages; / notification message means a message, a child within a window There are some things that have occurred and need to inform the parent window. The notification message is only available for standard window controls such as buttons, list boxes, combo boxs, edit boxes, and Windows 95 public controls such as tree views, list views, etc. For example, click or double-click a control, select some text in the control, and the scroll bar of the operating control will generate a notification message.

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

New Post(0)