|
-
December 18th, 2009, 04:13 PM
#1
Small problem with SetCaputure() in a CView (SDI)
Hello to all.
I am developing a small mouse movement detector. It is an SDI app that does some stuff only based on mouse movement, regardless form its position or button flag.
To do so, I tried to enable mouse capturing on left button, to send all mouse movement messages to my CView to monitorate them until right button is pressed.
Anyway, unfortunately, mouse movement is captured only inside CView and its window border, title and toolbar. I'd need messages to be conveyed to my MyCView::OnMouseMove(...) function.
I thank you all for any help
- Buzzyous -
-
December 19th, 2009, 03:51 AM
#2
Re: Small problem with SetCaputure() in a CView (SDI)
Try SetWindowsHookEx function with WH_MOUSE_LL parameter. You can have any information about the mouse in the hook callback, both when mouse input belongs to your application or not.
Regarding SetCapture, it can be set when your application owns the mouse input, and valid until mouse button is pressed. If it doesn't work, post some code.
Last edited by Alex F; December 19th, 2009 at 03:53 AM.
-
December 19th, 2009, 04:26 AM
#3
Re: Small problem with SetCaputure() in a CView (SDI)
I understand. I didn't know SetCapture() works only if mouse button is pressed. I thing in Dialog boxes it works anyway, but CView, being a different, more complex "window structure", works differently.
Thanks for the info on how to get mouse in any window... It will be very very useful.
- Buzzyous -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|