Windows操作系統(tǒng)定義了系統(tǒng)消息的類型,它通過諸如WM_PAINT之類的符號常量發(fā)送給你的應用程序。該符號常量由兩部分組成,如上例的WM前綴,它標識能處理消息的窗口類型;剩下的PAINT指定當消息接收后該窗口應該做什么。
消息前綴 |
對象窗口類型 |
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 |