Re: Capturing Mouse events outside Modal dialog box
- From: "Gary Chanson" <gchanson@xxxxxxxxxxxxxxxx>
- Date: Sun, 25 Jun 2006 06:05:14 -0400
"Nobody" <nobody@xxxxxxx> wrote in message
news:Trkng.2905$Nv.1233@xxxxxxxxxxxxx
<goelparesh@xxxxxxxxx> wrote in message
news:1151166847.297085.98340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, I wanted to capture mouseUp events occuring outside my modal dialog
box.
SetCapture seems to work only when the mouse is first Held Down in the
dialog box and then dragged outside.
Is there a way I can capture mouseUp events occuring outside my modal
dialog box without requiring the user to drag the mouse?
TIA
Why would you want to capture WM_LBUTTONUP outside your dialog box if its
not there from some kind of drag operation? SetCapture() wont work because
capture is automatically released by the OS when your app is not the
foreground application.
You can use a mouse hook, or better yet a journal hook (better performance).
If you use a mouse hook, you are going to be injecting your DLL into every
process which is pretty obnoxious.
A WH_MOUSE_LL hook is a global hook which doesn't get injected into all
processes...
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
.
- References:
- Capturing Mouse events outside Modal dialog box
- From: goelparesh
- Re: Capturing Mouse events outside Modal dialog box
- From: Nobody
- Capturing Mouse events outside Modal dialog box
- Prev by Date: Re: Capturing Mouse events outside Modal dialog box
- Next by Date: How not to choose fonts, part 3
- Previous by thread: Re: Capturing Mouse events outside Modal dialog box
- Next by thread: How not to choose fonts, part 3
- Index(es):
Relevant Pages
|