To put make it simple:
I have 2 emulators to which I'm simulating click on using SendMessage()
The emulator that I can dispatch this to is Nox
The window hierarchy and the window handle I'm passing the message to:
It works just as it's intended to do
(Listening to the message using spy++)
And the code:
SendMessage(NoxPlayer, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(width, height));
SendMessage(NoxPlayer, WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM(width, height));
SendMessage(NoxPlayer, WM_MOUSEMOVE, 0, MAKELPARAM(width, height));
I added the WM_MOUSEMOVE at the end because the noxplayer thinks I'm holding down L_Mouse click without it.
Now my problem lies here... I have another emulator called "MEmu player"
The window hierarchy and the window handle I'm passing the message to:
But when passing the same code as before:
SendMessage(MEmu, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(width, height));
SendMessage(MEmu, WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM(width, height));
SendMessage(MEmu, WM_MOUSEMOVE, 0, MAKELPARAM(width, height));
I get no simulated click on the application. I tried listening to any messages I'm passing but found none when going over all the visible windows using spy++.
Then I tried listening to how a normal mouse click would look like as messages using spy++ and got this:
For reference, this is what the same click without simulation would look like on the Nox Player:
Am I using the wrong code to send the simulated mouse click or am I passing this to the wrong window?