tamponlover69
❔ Way to use PostMessage as mouse click without switching current foreground window
Currently using
PostMessage(hTargetWindow, mapping, ti.wParam, ti.lParam)
,
the target window receives the event, mapping
is one of WM_MOUSEMOVE | WM_LBUTTONDOWN | WM_LBUTTONUP
, but the window is set as foreground i.e gets focused and any keyboard events will instead be sent to this window.
Is there a reliable way of using PostMessage with the previously mentioned events such that the window doesn't get focus? I tried using Get/SetForegroundWindow before and after PostMessage call, this didn't work (although return value of SetFg... was 1)8 replies