i found out the relevance of the WM_CAPTURECHANGED message. here is a crappy diagram of the message sequence:
Code:
WM_RBUTTONDOWN
S WM_CAPTURECHANGED
R WM_CAPTURECHANGED
WM_MOUSEMOVE (single message)
WM_RBUTTONUP
S WM_CAPTURECHANGED
R WM_CAPTURECHANGED
the above diagram describes an instance where the code is not captured.
the next diagram shows the sequence of messages when the mouse is dragged a bit, thus, when the code captures effectively.
Code:
WM_RBUTTONDOWN
S WM_CAPTURECHANGED
R WM_CAPTURECHANGED
WM_MOUSEMOVE (multiple messages)
S WM_CAPTURECHANGED
R WM_CAPTURECHANGED
WM_MOUSEMOVE (multiple messages)
WM_RBUTTONUP
clearly, you have to wait for the second set of WM_CAPTURECHANGED messages before releasing the mouse button, but why? and how do you stop this happening?