arkady
asked on
Clicking outside a modal dialog
How can I detect a mouse click ouside a modal dialog?
you can't
Capture the mouse:
::SetCapture(HWND hwnd)
This will send all mouse events to your dialog..
until it releases the capture (could happen with Alt-Tab)
When you don't need the mouseinput anymore, call
::ReleaseCapture()
When loosing the capture you get a WM_CAPTURECHANGED message, so you KNOW when your capture is released by Alt-Tab
This is the only possibility ...
Hopes this helps :)
Rick
::SetCapture(HWND hwnd)
This will send all mouse events to your dialog..
until it releases the capture (could happen with Alt-Tab)
When you don't need the mouseinput anymore, call
::ReleaseCapture()
When loosing the capture you get a WM_CAPTURECHANGED message, so you KNOW when your capture is released by Alt-Tab
This is the only possibility ...
Hopes this helps :)
Rick
ASKER
I know about capturing the mouse, but that makes the mouse useless in the dialog. It's not an option for me.
Some kind of a window hook?
Some kind of a window hook?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That worked fine, thanks.