VC ++ WINDOWS custom message range, vc custom
WINDOWS custom message WM_USER and WM_APP
The WM_USER constant is used by Windows to help applications define private messages in the private window class. Generally, WM_USER + is used as an integer, but the total value cannot exceed 0x7FFF (decimal: 32767 ).
# Define wm_user0 x 0400 --> 1024
The WM_APP constant is used by Windows to help the application define private messages. Generally, WM_APP + is used as an integer, but the total value cannot exceed 0 xBFFF (decimal: 49151 ).
# Define WM_APP 0x8000 --> 32768
Both are defined in WinUser. h.
Range Representation
0 ~ Messages retained by the WM_USER-1 operating system.
WM_USER~ Integer message used by the private window class 0x7FFF.
WM_APP~ Messages used by the 0 xBFFF application.
0xC000 ~ 0 xFFFF string message used by the application.
0 xFFFF ~ Messages retained by the operating system.
MFC pre-defines some common control bars in afxres. h.
# Define AFX_IDW_TOOLBAR 0xE800 // main Toolbar for window
# Define AFX_IDW_STATUS_BAR 0xE801 // Status bar window
# Define AFX_IDW_PREVIEW_BAR 0xE802 // PrintPreview Dialog Bar
# Define AFX_IDW_RESIZE_BAR 0xE803 // OLE in-place resize bar
# Define AFX_IDW_REBAR 0xE804 // COMCTL32 "rebar" Bar
# Define AFX_IDW_DIALOGBAR 0xE805 // CDialogBar