2005. január 12., szerda

What does WM_USER+0xB901 mean?


Problem/Question/Abstract:

What does WM_USER+0xB901 mean?

Answer:

WM_USER+0xB901 is a user defined Message parameter. Windows passes messages about as part of its operation. For example: OnMousemove, OnMousedown, OnExit, OnClose, OnActivate, etc.. These are all messages. The above messages are called a name (like OnMouseMove, etc) but they actually have a message NUMBER associated with them.

Assume you want to define your own message that you want to pass around the system, (such as pass to another window). You should NOT use an existing message number (such as the number equivalent to OnMouseDown) or it will cause undersirable effects. So you need to use messsage numbers beyond what is 'used' by windows. Windows effectively tells us what numbers are 'safe' to use by the WM_USER (Windows Message User) constant. All numbers from WM_USER are available for the user to define for there own message signalling. So messages like WM_USER+1, WM_USER+2, WM_USER+20, WM_USER+100, etc. can be used.

The 0xB901 just represents a Hexadecimal number (0x -> Hex) B901 == 47,361 in decimal.

Nincsenek megjegyzések:

Megjegyzés küldése