Re: Capturing Mouse events outside Modal dialog box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




<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.


.



Relevant Pages

  • Re: Capturing Mouse events outside Modal dialog box
    ... SetCapture seems to work only when the mouse is first Held Down in the ... Why would you want to capture WM_LBUTTONUP outside your dialog box if its ... You can use a mouse hook, or better yet a journal hook. ... If you use a mouse hook, you are going to be injecting your DLL into every ...
    (microsoft.public.win32.programmer.ui)
  • Re: DART nearly a bullseye
    ... >> capability/requirements of a delivery vehicle to the Space Station. ... > tethering you have a set of capture conditions to catch the tether. ... At the Rbar or close to it, the Hook attachers, then ...
    (sci.space.shuttle)
  • Re: SetCapture() & GetCapture() does not work on OnNcHitTest, OnNcLButtonDown etc...
    ... you have capture, ... SetCapture, it is the fact that SetCapture precludes the sending of WM_NCHITTEST messages. ... But if you are trying to let the user move the window by clicking and ... OnNcHitTest doesn't seem like a good place to call SetCapture. ...
    (microsoft.public.vc.mfc)
  • Re: Key Logger Component
    ... > key logger type component, that can capture every keystroke, including Ctrl, ... > needs to capture function keys. ... Hook:= SetWindowsHookEx(WH_KEYBOARD, KeyboardHook, 0, ... SetString(Result, Buf, GetKeyNameText(lParam, Buf, SizeOf(Buf))); ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Mouse Capture
    ... I have been using SetCapture for now. ... > Find great Windows Forms articles in Windows Forms Tips and Tricks ... >> could anyone please tell me how to capture mouse in Windows Forms.I want ...
    (microsoft.public.dotnet.framework.drawing)