Quote Originally Posted by AngelV View Post
Could you elaborate on this ? Does this method still rely on the label being above the windowless control while leaving some space between the bounding rect of the label and the bounding rectangle of the windowless control?
No, it does not.

The original purpose of SetCapture/ReleaseCapture API functions is to be able to receive WM_MOUSEMOVE on a hwnd (so called capturing window) even when mouse pointer is outside its bounds (not over it). Apparently there can be only one such window per thread/process.

Hot tracking impl in this case is very easy: once mouse is over the hwnd (i.e. on first received WM_MOUSEMOVE) capture the mouse input and switch control to hot state, then on subsequent WM_MOUSEMOVE check if mouse is over the control (because in capture mode the hwnd will receive WM_MOUSEMOVE even if mouse is moving outside hwnd) and if not over the control then release capture and switch to normal state.

Absolutely the same idea is implemented by hosts (VB6 forms, etc. but not MS Access) able to site windowless controls which in turn obviously cannot use SetCapture/ReleaseCapture API functions as there is no separate hwnd for them. The methods are Set/GetCapture on IOleInPlaceSiteWindowless interface on the site. Release of capture is impl with SetCapture(FALSE).

cheers,
</wqw>