Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving mouse

Status
Not open for further replies.

ZakiMaksyutov

Programmer
Feb 28, 2001
87
0
0
RU
Hi!
I would like to have a method which moves mouse to certain coordinates.
I may use WM_MOUSEMOVE, but what which HWND should I send?

Thanks to any help.
 
What kind of a project you have?
Is it a MFC project? If so, you can send it to the HWND of the CView derived class, you will have to write the entry for WM_MOUSEMOVE in the message map with Class Wizard and that is all.

Hope this helps,s-) Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Thanks for your answer, but I don't need this.

I would like to have this method:
BOOL MoveMouse(x, y);
which programmatically moves mouse to x,y.
And I would like to call it from any place.

Another question is:
can I simulate working on the computer?
Some programs determine that nobody working on the computer for a long time (1 - endless minutes) and do something. I would like to do program which simulates working on computer.

Thanks for any help.

Best regards,
zaki-maksyutov@yandex.ru
 
Hi,

Have you tryed the function:
SetCursorPos(x,y);
I have used it and it worked!!!

Hope it's help enough !
GOOOD
 
Thank for your answer!

In fact, I found decision a long time ago.
But thanks once again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top