Ok here is what I am doing! I got a game that I am hacking\creating auto healing macro. *I am using DEVC++ by BloodShed \ Also have CodeBlocks and Visual c++
*Using windows 32 API framework

I understand some basics of windows API, and getting handles, and device contexts and so forth. What I am trying to do is the following.

- Grab current coordinates of the mouse in the game window which I have the hwnd to.
- Send a mouse click to those coordinates, and if possible send a mouse click to those coordinates without the mouse having to actually go to those coordinates on the games screen.

PROBLEMS: The issue I am finding is no mouse functions to send to an exact coordinate. If at all possible I would like a mouse click to be sent at a particular coordinate without the mouse on that window actually moving to the coordinate.


Any help would be appreciated!

could you tried the SendMessage() API call?

and I recommand you to send WM_COMMAND message instead of the WM_LBUTTONDOWN message.
process the WM_LBUTTONDOWN inside your main window procedure and extract the coordinate
values and send them as WM_COMMAND.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.