Hey,
I'm trying to send a mouseclick-message to a game, like this:
But nothing happens. Any suggestions??
I'm trying to send a mouseclick-message to a game, like this:
Code:
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
HWND hWnd = FindWindowA(NULL, "GAME");
if(!hWnd)
{
cout << "HWND Failed" << endl;
getchar();
getchar();
exit(1);
}
Sleep(5000);
SendMessage(hWnd,WM_LBUTTONDOWN,0,0);
Sleep(100);
SendMessage(hWnd,WM_LBUTTONUP,0,0);
}