Typically you use WM_USER as a starting point for user defined messages. Here it is from the Platform SDK headers:
/*
* NOTE: All Message Numbers below 0x0400 are RESERVED.
*
* Private Window Messages Start Here:
*/
#define WM_USER 0x0400
Also, the
WM_USER documentation specifies the following guidelines:
"The following are the ranges of message numbers:
0 through WM_USER-1: Messages reserved for use by the system.
WM_USER through 0x7FFF: Integer messages for use by private window classes.WM_APP through 0xBFFF: Messages available for use by applications.
0xC000 through 0xFFFF: String messages for use by applications.
Greater than 0xFFFF: Reserved by the system for future use."
WM_USER is well within the range of a short, so you should be able to get this to work by defining your private message to be a small value above WM_USER.
- Elton