Whenever the user presses a key, moves the mouse, or clicks a mouse button, Windows responds by sending input messages to the appropriate application. Windows also sends input messages in response to timer input.
Windows provides several types of input messages:
Message type | Description |
Keyboard | User input through the keyboard |
Character | Keyboard input translated into character codes |
Mouse | User input through the mouse |
Timer | Input from the system timer |
Scroll bar | User input through a window's scroll bars and the mouse |
Menu | User input through a window's menus and the mouse |
Input messages from the keyboard, mouse, and timer correspond directly to hardware input. Windows passes these messages to your application through the application queue.
Character, menu, and scroll bar messages are created in response to mouse and keyboard actions in the nonclient area of a window, or are the result of translated keyboard messages. Typically, Windows sends these messages directly to the appropriate window procedure.