Re: [GD-Windows] Detecting mouse exiting window?
Brought to you by:
vexxed72
From: Javier A. <ja...@py...> - 2002-08-06 14:18:34
|
Nicolas Romantzoff <nic...@fr...> wrote: > 1. To capture the mouse on first WM_MOUSEMOVE received by window > (mouse enters) 2. To get each single mouse move message afterward.. > Test if its outside of window.. If inside => 2 > If outside => 3 > 3. Release mouse capture => 1 If you want to go ahead with that scheme, good luck... Remember: - Handle the WM_CAPTURECHANGED message - Check against the client rect so the the window controls (minimize, etc) work. - Release the mouse whenever the window (NOT the app - might be a child window) loses focus. - Make sure that all windows special keys work properly while the mouse is captured - not sure if mouse capture affects that. - Whenever in doubt, Release the mouse - if it's on the window you'll recapture it when it moves again. - Many other things I'm sure will go wrong. The polling solution may be a hack but at least it's a compliant way to overcome a limitation of Win95. Javier Arevalo Pyro Studios |