Mouse capture problem
-
Hi, I'm capturing the mouse with "SetCapture()" and then process the mouse movement in OnMouseMove(UINT nFlags, CPoint point). The problem is that every time I get outside of my dialog window, the OnMouseMove routine isn't called anymore. How come:confused: My project is a dialog based application and I remember not having this problem with a non-dialog based application. Also how can I make my cursor invisible? Any idea?? Thanks:)
-
Hi, I'm capturing the mouse with "SetCapture()" and then process the mouse movement in OnMouseMove(UINT nFlags, CPoint point). The problem is that every time I get outside of my dialog window, the OnMouseMove routine isn't called anymore. How come:confused: My project is a dialog based application and I remember not having this problem with a non-dialog based application. Also how can I make my cursor invisible? Any idea?? Thanks:)
I think non-dialog and dialog based applications have the same problem. Because once the mouse move outside a window, the mouse messages won't be sent to the window unless a mouse button has been pressed down. It is capable even to the window used "SetCapture()". Sorry but it's out of my reach to solve this problem. But you can use the sentence "::SetCursor(::LoadCursor(NULL,NULL));" to make your cursor invisble and use the sentence "::SetCursor(::LoadCursor(NULL,IDC_ARROW));" to restore it. And, you can always use GetCursorPos() function to retrieve the mouse cursor's current position. Hope it can help you. ;) Law is meaningless without chaos. Chaos without Law is equal to destruction. Chaos and Law create our rich and colorful world.
-
I think non-dialog and dialog based applications have the same problem. Because once the mouse move outside a window, the mouse messages won't be sent to the window unless a mouse button has been pressed down. It is capable even to the window used "SetCapture()". Sorry but it's out of my reach to solve this problem. But you can use the sentence "::SetCursor(::LoadCursor(NULL,NULL));" to make your cursor invisble and use the sentence "::SetCursor(::LoadCursor(NULL,IDC_ARROW));" to restore it. And, you can always use GetCursorPos() function to retrieve the mouse cursor's current position. Hope it can help you. ;) Law is meaningless without chaos. Chaos without Law is equal to destruction. Chaos and Law create our rich and colorful world.