A message is a notification from Windows that tells an application that something has happened. For example, clicking the mouse, resizing a window, or pressing a key on the keyboard causes Windows to send a message to the application.
The message itself is passed to the application as a record that contains the type of message and other information. For example, for messages generated by a mouse click, this record contains the coordinates of the mouse click. This record type is called TMsg, and it is declared in the Windows unit like this:
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 message specific additional information
time : DWORD;//The time when the message was created
pt: TPoint; //The mouse position when the message was created
end ;
What's in the message?
Do you feel like the information in a message log is Greek? If so, then take a look at the following explanation: hwnd 32-bit window handle. A window can be any type of screen object, since Win32 is able to maintain handles to most
visual objects (windows, dialogs, buttons, edit boxes, etc.). message is a constant value used to distinguish other messages. These constants can be predefined constants in Windows units or
custom constants.
wParam is usually a constant value associated with the message, and may also be a handle to a window or control.
lParam is usually a pointer to data in memory. Since WParam, lParam and Pointer are all 32-bit, they can be converted to each other.
WM_NULL = $0000 //
WM_CREATE = $0001 // The application creates a window
WM_DESTROY = $0002 // A window is destroyed
WM_MOVE = $0003 // A window is moved
WM_SIZE= $0005 // A window is resized
WM_ACTIVATE= $0006 // A window is Activate or lose the activation state;
WM_SETFOCUS= $0007 //After gaining focus
WM_KILLFOCUS= $0008 //Lost focus
WM_ENABLE= $000A //Change enable state
WM_SETREDRAW= $000B //Set whether the window can be redrawn
WM_SETTEXT= $000C //Application Send this message to set the text of a window
WM_GETTEXT = $000D //The application sends this message to copy the text of the corresponding window to the buffer
WM_GETTEXTLENGTH = $000E //Get the length of the text associated with a window (excluding null characters)
WM_PAINT = $000F //Ask a window to repaint itself
WM_CLOSE = $0010 //Send a signal when a window or application is about to close
WM_QUERYENDSESSION= $0011 //When the user chooses to end the dialog or the program itself calls the ExitWindows function
WM_QUIT= $0012 / /Used to end the program running or when the program calls the postquitmessage function
WM_QUERYOPEN = $0013 //Send this message to an icon when the user window is restored to its previous size and position
WM_ERASEBKGND = $0014 //When the window background must be erased (eg when the window is resized)
WM_SYSCOLORCHANGE = $0015 //When When the system color changes, send this message to all top-level windows
WM_ENDSESSION = $0016 // When the system process issues a WM_QUERYENDSESSION message, this message is sent to the application to inform it if the conversation is over
WM_SYSTEMERROR = $0017 //
WM_SHOWWINDOW= $0018 // When hidden or The display window is to send this message to this window
WM_ACTIVATEAPP = $001C //Send this message to the application which window is active and which is inactive;
WM_FONTCHANGE= $001D //When the system font resource library changes, this message is sent to All top-level windows
WM_TIMECHANGE= $001E //Send this message to all top-level windows when the system's time changes
WM_CANCELMODE= $001F //Send this message to cancel an ongoing touch (operation)
WM_SETCURSOR = $0020 //If the mouse Causes the cursor to move in a window and the mouse input is not captured, send a message to a window
WM_MOUSEACTIVATE = $0021 //This message is sent when the cursor is in an inactive window and the user is pressing a mouse button To the current window
WM_CHILDACTIVATE = $0022 //Send this message to the MDI child window when the user clicks the title bar of this window, or when the window is activated, moved, resized
WM_QUEUESYNC= $0023 //This message is sent by the computer-based training program, and the user input message is separated out by the hook program of
WH_JOURNALPALYBACK WM_GETMINMAXINFO= $0024 //This message is sent to the window when it is about to change size or position;
WM_PAINTICON = $0026 //Sent to Minimize window when its icon is about to be redrawn
WM_ICONERASEBKGND = $0027 //Send this message to a minimized window only if its background must be redrawn before drawing the icon
WM_NEXTDLGCTL = $0028 //Send this message to a dialog Box program to change the focus position
WM_SPOOLERSTATUS= $002A //This message is sent whenever the print management queue adds or subtracts a job
WM_DRAWITEM= $002B //This message is sent when the visual appearance of the button, combobox, listbox, menu changes to The owner of these empty items
WM_MEASUREITEM= $002C //When a button, combo box, list box, list view control, or menu item is created send this message to the control's owner
WM_DELETEITEM = $002D //When the list box or The combo box is destroyed or when some items are deleted via LB_DELETESTRING, LB_RESETCONTENT, CB_DELETESTRING, or CB_RESETCONTENT message
WM_VKEYTOITEM = $002E //This message has a LBS_WANTKEYBOARDINPUT style sent to its owner in response to the WM_KEYDOWN message
WM_CHARTOITEM = $002F //This message is sent by a LBS_WANTKEYBOARDINPUT style listbox to its owner in response to the WM_CHAR message
WM_SETFONT= $0030 //The program sends this message when drawing text to get the color to use for the control
WM_GETFONT= $0031 //Application The program sends this message to get the font of the text drawn by the current control
WM_SETHOTKEY= $0032 //The application sends this message to associate a window with a hotkey
WM_GETHOTKEY= $0033 //The application sends this message to determine whether the hotkey is associated with a window Associated
WM_QUERYDRAGICON= $0037 //This message is sent to the minimized window. When the window is about to be dragged and dropped and no icon is defined in its class, the application can
return a handle to an icon or cursor, and the system displays this when the user drags and drops the icon Icon or cursor
WM_COMPAREITEM= $0039 //Send this message to determine the relative position of the newly added item in the combobox or listbox
WM_GETOBJECT= $003D //WM_COMPACTING = $0041 //Display memory is low
WM_WINDOWPOSCHANGING = $0046 //Send this message to that When the size and position of the window is about to be changed, call the setwindowpos function or other window management functions
WM_WINDOWPOSCHANGED = $0047 //Send this message to the window whose size and position have been changed, call the setwindowpos function or other window management functions
WM_POWER= $0048 //(for 16-bit windows) Send this message when the system is about to enter a suspend state
WM_COPYDATA = $004A //Send this message when one application passes data to another application
WM_CANCELJOURNAL= $004B //When a user cancels the program journal activation state, submit this message to the program
WM_NOTIFY = $004E //When a certain When an event of a control has occurred or the control needs to get some information, send this message to its parent window
WM_INPUTLANGCHANGEREQUEST = $0050 //When the user selects an input language, or the input language hotkey changes
WM_INPUTLANGCHANGE= $0051 // Send this message to the top-level window affected when the platform context has been changed
WM_TCARD= $0052 //Send this message to the application when the program has initialized windows help routines
WM_HELP = $0053 //This message shows that the user pressed F1 , if a menu is active, send this message to the menu associated with this window, otherwise
send it to the window with focus, if there is currently no focus, send this message to the currently activated window
WM_USERCHANGED= $0054 // When the user has logged in or logged out, this message is sent to all windows. When the user logs in or out, the system updates the user's specific
setting information, and the system sends this message immediately when the user updates the settings;
WM_NOTIFYformAT = $0055 //Public controls, custom Controls and their parent windows use this message to determine whether the control uses ANSI or UNICODE structure
in the WM_NOTIFY message. Using this control can enable a control to communicate with its parent control.
WM_CONTEXTMENU= $007B //When the user has a certain Click the right button in the window to send this message to this window
WM_styleCHANGING= $007C //Send this message to that window when calling the SETWINDOWLONG function to change the style of one or more windows WM_styleCHANGED = $007D //Send this message to that window when calling the SETWINDOWLONG function to change the style of
one or more windows
WM_DISPLAYCHANGE= $007E //Send this message to all windows when the display resolution is changed
WM_GETICON= $007F //This message is sent to a window to return the handle of the large icon or small icon associated with a window;
WM_SETICON= $0080 //The program sends this message to associate a new large or small icon with a window;
WM_NCCREATE = $0081 //When a window is first created, this message is sent before the WM_CREATE message is sent;
WM_NCDESTROY = $0082 //This message informs a window that the non-client area is being destroyed
WM_NCCALCSIZE = $0083 //This message is sent when a window's client area must be accounted for
WM_NCHITTEST= $0084 //Occurs when the mouse is moved, held down or released
WM_NCPAINT= $0085 //The program sends this message to a window when its (window's) frame must be painted;
WM_NCACTIVATE= $0086 //This message is sent to a window only if its non-client area needs to be changed to display yes Active or inactive state;
WM_GETDLGCODE= $0087 //Send this message to a control associated with the dialog program, the widdows control the orientation key and the TAB key to make the input enter this control
By responding to the WM_GETDLGCODE message, the application can treat it as a special input control and can handle it
WM_NCMOUSEMOVE = $00A0 //Send this message to a window when the cursor moves in the non-client area of the window //The non-client area is : The title bar of the form and
the frame of the window
WM_NCLBUTTONDOWN= $00A1 //
Submit this message when the cursor is in the non-client area of a window and the left mouse button is pressed
WM_NCLBUTTONUP= $00A2 //When the user releases the left mouse button and the cursor is simultaneously A window sends this message in the non-client area;
WM_NCLBUTTONDBLCLK= $00A3 //When the user double-clicks the left mouse button and the cursor is in the non-client area 10, this message is sent
WM_NCRBUTTONDOWN= $00A4 //When the user presses the right mouse button at the same time This message is sent when the cursor is in the non-client area of the window again
WM_NCRBUTTONUP= $00A5 //When the user releases the right mouse button and the cursor is in the non-client area of the window, this message is sent
WM_NCRBUTTONDBLCLK= $00A6 //When the user double-clicks the right mouse button and the cursor is This message is sent to each window in the non-client area
WM_NCMBUTTONDOWN= $00A7 //When the user presses the middle mouse button and the cursor is in the non-client area of the window, this message is sent
WM_NCMBUTTONUP= $00A8 //When the user releases the middle mouse button and the cursor is at the same time This message is sent again in the non-client area of the window
WM_NCMBUTTONDBLCLK= $00A9 //When the user double-clicks the middle mouse button and the cursor is in the non-client area of the window, this message is sent
WM_KEYFIRST = $0100 //
WM_KEYDOWN= $0100 //Press a key
WM_KEYUP= $0101 //A key is released
WM_CHAR = $0102 //A key is pressed, and WM_KEYDOWN, WM_KEYUP message has been issued
WM_DEADCHAR = $0103 //When translating the WM_KEYUP message with the translatemessage function, this message is sent to the window with focus
WM_SYSKEYDOWN = $0104 / /Submit this message to the window that has the focus when the user holds down the ALT key while pressing other keys;
WM_SYSKEYUP = $0105 //Submit this message to the window that has the focus when the user releases a key while the ALT key is still held down
WM_SYSCHAR= $0106 //Submit this message to the window with focus
when the WM_SYSKEYDOWN message is translated by the TRANSLATEMESSAGE function WM_SYSDEADCHAR= $0107 //When the WM_SYSKEYDOWN message is translated by the TRANSLATEMESSAGE function, send this message to the window with focus
WM_KEYLAST= $0108 // WM_INITDIALOG
= $0110 //In A dialog program is sent this message before it is displayed, usually with 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 keys are translated
WM_SYSCOMMAND = $0112 //When the user selects a command of the window menu or when the user chooses to maximize or minimize that window will receive this message
WM_TIMER= $0113 //A timer event occurs
WM_HSCROLL= $0114 //Send this message to the window when a standard horizontal scroll bar of a window generates a scroll event, and also to the control that owns it
WM_VSCROLL= $0115 //Send this message when a standard vertical scroll bar of a window generates a scroll event message to that window also, to the control that owns
it
Change menu before showing
WM_INITMENUPOPUP= $0117 //This message is sent when a drop-down menu or submenu is about to be activated, it allows the program to change the menu before it is shown, instead of
changing the whole
WM_MENUSELECT = $011F //When the user selects a menu item Send this message to the owner of the menu (usually a window)
when the menu is activated WM_MENUCHAR = $0120 //When the menu has been activated and the user presses a key (different from the accelerator key), send this message to the owner of the menu;
WM_ENTERIDLE= $0121 //Send this message to its owner when a modal dialog or menu enters the empty state, a modal dialog or menu enters the empty state without a message after processing one or several previous messages 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 windows draws the message box. By responding to this message, the owner window can
use the given related display device. The handle to set the text and background color of the message box
WM_CTLCOLOREDIT = $0133 //Send this message to its parent window when an edit control is about to be drawn; by responding to this message, the owner window can
use the given related Handle to the display device to set the text and background color of the edit box
WM_CTLCOLORLISTBOX= $0134 //Send this message to its parent window when a listbox control is about to be drawn; by responding to this message, the owner window can
use the given The handle of the relevant display device to set the text and background color of the list box
WM_CTLCOLORBTN= $0135 //When a button control is about to be drawn, this message is sent to its parent window; by responding to this message, the owner window can
be used to give Set the button's text and background color by specifying the handle of the relevant display
device
Use the given handle to the associated display device to set the text background color of the dialog
WM_CTLCOLORSCROLLBAR= $0137 //Send this message to its parent window when a scrollbar control is about to be drawn; by responding to this message, the owner window can
Sets the scrollbar's background color by using the given handle to the associated display device
WM_CTLCOLORSTATIC = $0138 //Send this message to its parent window when a static control is about to be drawn; in response to this message, the owner window can
set the text and background of the static control by using the given handle to the associated display device Color
WM_MOUSEFIRST = $0200 //
WM_MOUSEMOVE= $0200 //Move the mouse
WM_LBUTTONDOWN= $0201 //Press the left mouse button
WM_LBUTTONUP= $0202 //Release the left mouse button
WM_LBUTTONDBLCLK= $0203 //Double click the left mouse button
WM_RBUTTONDOWN= $0204 //Press the right mouse button
WM_RBUTTONUP= $0205 //Release the right mouse button
WM_RBUTTONDBLCLK= $0206 //Double-click the right mouse button
WM_MBUTTONDOWN= $0207 //Press the middle mouse button
WM_MBUTTONUP= $0208 //Release the middle mouse button
WM_MBUTTONDBLCLK= $0209 //Double-click the middle mouse button
WM_MOUSEWHEEL = $020A // This message is sent when the mouse wheel turns the currently focused control
WM_MOUSELAST= $020A //
WM_PARENTNOTIFY = $0210 //Sent when an MDI child window is created or destroyed, or when the user presses the mouse button and the cursor is on the child window This message is sent to its parent window
WM_ENTERMENULOOP= $0211 //Send this message to notify the application's main window that it has entered menu loop mode
WM_EXITMENULOOP = $0212 //Send this message to notify the application's main window that it has exited menu loop mode
WM_NEXTMENU = $0213 // WM_SIZING
= 532 //Send this message to the window when the user is resizing the window; through this message the application can Monitor window size and position
can also modify them
WM_CAPTURECHANGED = 533 //Send this message to the window when it loses the captured mouse;
WM_MOVING = 534 //Send this message when the user is moving the window, through this message the application can monitor the window Size and position
can also be modified;
WM_POWERBROADCAST = 536 //This message is sent to the application to notify it about power management events;
WM_DEVICECHANGE = 537 //This message is sent to the application or device driver when the device's hardware configuration changes
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_COMPOSITION_SELECT = $0285 // $M_IME_COMPOSITION_SELECT= $
0285
WM_IME_CHAR= $0286 //
WM_IME_REQUEST = $0288 //
WM_IME_KEYDOWN = $0290 //
WM_IME_KEYUP = $0291 //
WM_MDICREATE= $0220 //The application sends this message to the multi-document client window to create an MDI child window
WM_MDIDESTROY = $0221 //The application sends This message is sent to the multi-document client window to close an MDI child window
WM_MDIACTIVATE= $0222 //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 Send the WM_MDIACTIVE message to the MDI child window (inactive) to activate it;
WM_MDIRESTORE = $0223 //The program sends this message to the MDI client window to restore the child window from the maximum minimized to the original size
WM_MDINEXT= $0224 //The program sends this message to the MDI client Window activates the next or previous window
WM_MDIMAXIMIZE= $0225 //The program sends this message to the MDI client window to maximize an MDI child window;
WM_MDITILE= $0226 //The program sends this message to the MDI client window to rearrange all MDI in tiles Child window
WM_MDICASCADE = $0227 //The program sends this message to the MDI client window to rearrange all MDI child windows in a cascade manner
WM_MDIICONARRANGE = $0228 //The program sends this message to the MDI client window to rearrange all minimized MDI child windows
WM_MDIGETACTIVE = $0229 //The program sends this message to the MDI client window to find the handle of the
active subwindow WM_MDISETMENU = $0230 //The program sends this message to the MDI client window to replace the subwindow's menu with the MDI menu
WM_ENTERSIZEMOVE= $0231 //
WM_EXITSIZEMOVE = $0232 //
WM_DROPFILES= $0233 //
WM_MDIREFRESHMENU = $0234 //
WM_MOUSEHOVER = $02A1 //
WM_MOUSELEAVE = $02A3 //
WM_CUT= $0300 //The program sends this message to an edit box or combobox to delete the currently selected text
WM_COPY = $0301 // The program sends this message to an edit box or combobox to copy the currently selected text to the clipboard
WM_PASTE= $0302 //The program sends this message to the editcontrol or combobox to get the data from the clipboard
WM_CLEAR= $0303 //The program sends this message to the editcontrol or combobox clears the current selection;
WM_UNDO = $0304 //The program sends this message to editcontrol or combobox to undo the last operation
WM_RENDERformAT = $0305; //
WM_RENDERALLformATS = $0306 //
WM_DESTROYCLIPBOARD = $0307 //Send this message to the owner of the clipboard when the ENPTYCLIPBOARD function is called
WM_DRAWCLIPBOARD= $0308 //Send this message to the first window in the clipboard watch chain when the contents of the clipboard change; it allows using the clipboard Watch the window to
display the new content of the clipboard;
WM_PAINTCLIPBOARD = $0309 //When the clipboard contains data in CF_OWNERDIPLAY format and the client area of the clipboard watch window needs to be redrawn;
WM_VSCROLLCLIPBOARD = $030A //
WM_SIZECLIPBOARD= $030B //When the clipboard Contains data in CF_OWNERDIPLAY format and the size of the client area of the clipboard watch window has changed. This message is sent to the clipboard owner through the clipboard watch window;
WM_ASKCBformATNAME= $030C //Send this message to the clipboard through the clipboard watch window The owner to request the name of a clipboard in CF_OWNERDISPLAY format
WM_CHANGECBCHAIN= $030D //When a window is removed from the clipboard watch chain, this message is sent to the first window of the clipboard watch chain;
WM_HSCROLLCLIPBOARD = $030E / /
This message is sent to the clipboard owner via a clipboard watcher; it occurs when the clipboard contains data in CFOWNERDISPALY format and there is an event on the clipboard watcher's horizontal scroll bar; the owner should scroll the clipboard graph Image and update the value of the scroll bar;
WM_QUERYNEWPALETTE= $030F //This message is sent to the window that will receive the focus. This message enables the window to have the opportunity to implement its logical palette when it receives the focus.
WM_PALETTEISCHANGING= $0310 //This message is sent when an application is about to implement its logical palette to notify all applications
WM_PALETTECHANGED = $0311 //This message is sent after a focused window implements its logical palette Message to all top-level and overlapping windows
to change the system palette
WM_HOTKEY = $0312 //Submit this message when the user presses a hotkey registered by the REGISTERHOTKEY function
WM_PRINT= 791 //The application sends this message only when WINDOWS or other application issues a request to draw part of an application;
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 program submits this message to start a session with a server program in response to that specified program and topic name;
WM_DDE_TERMINATE= WM_DDE_FIRST + 1 //A DDE application (either client or server) submit this message to terminate a session;
WM_DDE_ADVISE = WM_DDE_FIRST + 2 //A DDE client submits this message to a DDE server to request the server to update it whenever a data item changes
WM_DDE_UNADVISE = WM_DDE_FIRST + 3 //A DDE client informs a DDE server through this message that Update the specified item or an item in a special clipboard format
WM_DDE_ACK= WM_DDE_FIRST + 4 //This message informs a DDE (Dynamic Data Exchange) program that a WM_DDE_POKE, WM_DDE_EXECUTE, WM_DDE_DATA, WM_DDE_ADVISE, WM_DDE_UNADVISE, or WM_DDE_INITIAT message has been received and is being processed
WM_DDE_DATA = WM_DDE_FIRST + 5 //A DDE server submits this message to a DDE client to pass a data item to the client or notify the client of an available data item
WM_DDE_REQUEST= WM_DDE_FIRST + 6 //A DDE client submits this message to a DDE server to request the value of a data item;
WM_DDE_POKE = WM_DDE_FIRST + 7 //A DDE client submits this message to a DDE server, and the client uses this message to request the server to receive an unauthorized data item; the server replies by The WM_DDE_ACK message indicates whether it accepts the data item;
WM_DDE_EXECUTE= WM_DDE_FIRST + 8 //A DDE client submits this message to a DDE server to send a string to the server to be processed as a serial command, by submitting WM_DDE_ACK message to respond;
WM_DDE_LAST = WM_DDE_FIRST + 8 //
WM_APP = $8000 //
WM_USER = $0400 //This message can help applications customize private messages;
///////////////////////////////////////////// //////////////////
Notification message (Notification message) refers to a message that something happens to a child control in a window and needs to
notify parent window. Notification messages only apply to standard window controls such as buttons, list boxes, combo boxes, edit boxes, and Windows 95
common controls such as tree views and list views. For example, clicking or double-clicking a control, selecting part of the text in the control, and manipulating the control's
scroll bars all generate notification messages.
Button
BN_CLICKED //The user clicked the button
BN_DISABLE //The button is disabled
BN_DOUBLECLICKED //The user double-clicked the button
BN_HILITE //The user highlighted the button
BN_PAINT //The button should be redrawn
BN_UNHILITE //The highlighting should be removed
Combo box
CBN_CLOSEUP //The list box of the combo box is closed
CBN_DBLCLK //The user double-clicked a string
CBN_DROPDOWN //The list box of the combo box was pulled out
CBN_EDITCHANGE //The user modified the text in the edit box
CBN_EDITUPDATE //In the edit box Text is about to update
CBN_ERRSPACE //The combo box is out of memory
CBN_KILLFOCUS //The combo box loses input focus
CBN_SELCHANGE //An item is selected in the combo box
CBN_SELENDCANCEL //The user's selection should be canceled
CBN_SELENDOK //The user's selection is valid
CBN_SETFOCUS // Combobox gets input focus
Edit box
EN_CHANGE //The text in the edit box has been updated
EN_ERRSPACE //Insufficient memory in the edit box
EN_HSCROLL //The user clicked the horizontal scroll bar
EN_KILLFOCUS //The edit box is losing the input focus
EN_MAXTEXT //The inserted content is truncated
EN_SETFOCUS //Edit box Get input focus
EN_UPDATE //The text in the edit box will be updated
EN_VSCROLL //The user clicked the vertical scroll bar message meaning
List box
LBN_DBLCLK //The user double-clicked an item
LBN_ERRSPACE //There is not enough memory in the list box LBN_KILLFOCUS //The
list box is losing the input focus
LBN_SELCANCEL //The selection is canceled
LBN_SELCHANGE //Another item is
selected LBN_SETFOCUS //The list box gets the input focus