C/C++ >> i hate MouseCapture() function
Posted by kishua2000 on 18:40:00 01-07-2002
I'm using Api function and wants that the window that i created will capture ALL mouse Clicks in every window, or at least will be notified about mouse clicks anytime anywhere. the MouseCapture(hwnd) function is not good cuz it works only if the mouse is held inside my window at the start.
what to do, i'm desperate
Posted by KaGez on 07:39:00 01-08-2002
I think since it's WinAPI you can move the pointer to a specific position at startup, so maybe moving it into the window before locking it could help
dunno if there is such a function, but there should be.
[addsig]
Posted by kishua2000 on 21:14:00 01-08-2002
you are realy from the dark side... you are really fuzzy... what do you mean?

anyway I watched a tv show about jupan. kavasaky is avery industrial town.. a lot of air pollution ... do you like to live there?

ANYWAY:
somebody told me that HOOK function could help. what is it?
Posted by KaGez on 08:34:00 01-09-2002
there is a whole "dictionary" about WinAPI functions on MSDN. Maybe checking that out will get you the answer a little bit faster
and yes, I like it to live in this town. I don't care if I die on lung cancer or if I get smacked by a car or die because I'm too old And, the pollution isn't that bad at all....
[addsig]
Posted by -KEN- on 00:36:00 01-16-2002
There's no API function to do this...and they didn't mean to use a HOOK function, they meant to use a mouse hook. Don't ask me what it is, but I know a keyboard hook captures all key events, so I figure the same goes with a mouse... [addsig]
Posted by KaGez on 13:03:00 01-16-2002
-KEN- out for rescue!

another solution would be to make the windows fullscreen. Then the mouse will 100%ly be in the window it isn't a solution that is wanted always tho :/
[addsig]
Posted by -KEN- on 22:59:00 01-16-2002
heh...


I dunno if this will work, but I think you could use SetCapture(NULL);, probably...I know I used it once to trap outside mouse movements in a painting program (so if they dragged the mouse off of the surface while minimized it would still draw to the mem HDC...which was then BitBlt()'d to the screen) [addsig]
Posted by -KEN- on 00:16:00 01-23-2002
Actually, maybe if you use MouseCapture(NULL) it might work the same for clicks as SetCapture(NULL) works for movement...just a thought... [addsig]
Posted by KaGez on 00:35:00 01-27-2002
or, you just spawn the window in the middle of the screen, which will make the possibility that the mouse pointer is on the windows hight. Just a idea tho ...
[addsig]