I made a C ++ program that simulates clicks on an inactive window using:
PostMessage (z, WM_LBUTTONDOWN, 0,MAKELONG(t.left+x,t.top+y));
But whenever he clicks, he activates the window, and the window moves to the beginning.
Is there a way to make the window remain inactive or in another way click it?
I used SetWindowPos(z , HWND_BOTTOM,....) so that this window is at the bottom of the z-order list, but it is still activated.
EDIT: window - game console.
source share