Alternative to SetCursorPos?
-
I have 2 MS paintbrush applications side by side. I want to duplicate the brush strokes of one paintbrush on the other. I do this by installing a dll WH_GETMESSAGE hook on the 1st paintbrush and detect WM_MOUSEMOVE and LBUTTONUP/DOWN events. But how to duplicate it on the 2nd paint app? If i do setCursorPos the mouse moves away from the control of the artist. And sending a PostMessage(WM_MOUSEMOVE,x,y) to the 2nd paint doesn't seem to work. Is there any way to simulate a mouse move without taking the mouse away from the user? Need Help. thanks.:confused: Regards, Zee man
-
I have 2 MS paintbrush applications side by side. I want to duplicate the brush strokes of one paintbrush on the other. I do this by installing a dll WH_GETMESSAGE hook on the 1st paintbrush and detect WM_MOUSEMOVE and LBUTTONUP/DOWN events. But how to duplicate it on the 2nd paint app? If i do setCursorPos the mouse moves away from the control of the artist. And sending a PostMessage(WM_MOUSEMOVE,x,y) to the 2nd paint doesn't seem to work. Is there any way to simulate a mouse move without taking the mouse away from the user? Need Help. thanks.:confused: Regards, Zee man
-
I have never done this but here's a thought... Use CWnd* myWnd = CWnd::FindWindow(NULL, _T("Paint2")); myWnd->PostMessage(..) and send all the mouse movement messages that you receive to the other window. It may work, it may not.
Thats what I said I did and but it doesn't work. If I just filter out mousemove, lbuttonup and lbuttondown and postmessage those, VC spy says the destination paint is getting them but nothing draws on the paint area. If I send all mouse events then the detination paint just hangs up. I'm stuck. Regards, Zee Man