How to implement a remote control application?
Hi all,
Now I want to implement a remote control application, then I google it. I found SendMessage, FindWindow and GetDesktopWindow can help me do something basic. I write some test code in Visual Studio 2010 Experess, then run the application in Win7. Code looks like:
  ::SendMessage(::GetDesktopWindow(), WM_MOU开发者_如何学运维SEMOVE, (WPARAM)0, LPARAM(0));
I just want to send a message to the desktop and move the cursor the position (0, 0). However, the cursor doesn't move at all.
I think it's the cursor movement that generates the WM_MOUSEMOVE message. what I want is just oppsite. So what should I do, can any SDK API help me finish the cursor movement and the click operation of every kind?
Thanks.
SetCursorPos is what you're looking for, I think.
Moves the cursor to the specified screen coordinates. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function call, the system automatically adjusts the coordinates so that the cursor stays within the rectangle.
精彩评论