Mouse click Simulation ?
-
Hi all, Do you know how to simulate a left button mouse click on another application ? (use SendMessage api ?) Thanks, ken
You will need the HWND of the window to which you want to send the mouse-click. Actually it is the WM_LBUTTONDOWN and WM_LBUTTONUP messages which need to be sent. You can:
//here, you will need to specify hWnd, x and y. ::SendMessage(hWnd,WM_LBUTTONDOWN,0,MAKELPARAM( x, y )); //Then... ::SendMessage(hWnd,WM_LBUTTONUP,0,MAKELPARAM( x, y ));
It seems that the toolbars, menus, caption bars etc do not respond to this technique, however I am not sure. this is this. -
Hi all, Do you know how to simulate a left button mouse click on another application ? (use SendMessage api ?) Thanks, ken
kendao wrote:
Do you know how to simulate a left button mouse click on another application ? (use SendMessage api ?)
Better Use mouse_event Function or SendInput function for Simulating mouse on your or other window
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV