Appendix C. Windows Message Types
The Windows operating system defines the type of system message that it sends to your application by a symbolic constant such as WM_PAINT
. The symbolic constant is composed of two parts: a prefix, WM
in this case, that identifies the type of window that can process the message, and the rest, PAINT
in this case, that specifies what the window should do when the message is received. The following table shows the message prefixes and the corresponding target window category.
Message Prefix | Target Window Type |
---|---|
ABM | Application desktop toolbar control |
BM | Button control |
CB | Combo box control |
CBEM | Extended combo box control |
CDM | Common dialog box control |
DBT | Device |
DL | Drag list box control |
DM | Default push button control |
DTM | Date and time picker control |
EM | Edit control |
HDM | Header control |
HKM | Hot key control |
IPM | IP address control |
LB | List box control |
LVM | List view control |
MCM | Month calendar control |
PBM | Progress bar control |
PGM | Pager control |
PSM | Property sheet |
RB | Rebar control |
SB | Status bar control |
SBM | Scroll bar control |
STM | Static control |
TB | Toolbar |
TBM | Trackbar |
TCM | Tab control |
TTM | Tooltip control |
TVM | Tree view control |
UDM | Up-down control |
WM | General window |
The symbolic constants that identify system messages have values in the range 0
to WM_USER-1
, so this range of values is reserved. An application can create messages for its own purposes and such messages can have identifiers with values in the range from WM_USER
(that corresponds to the value 0x0400
) to 0x7FFF
.
Get Ivor Horton's Beginning Visual C++®2008 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.