❔ 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)7 Replies
What are you trying to make?
a multi-seat-like app that does this
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
google multiseat. the app is covered by nda.
ill rephrase what im trying to do: emulate a mouse down/up/move event with PostMessage to a pre-determined target window, without changing the foreground window. The foreground window is the one which is currently active i.e the only one which receives keyboard events
a single computer which supports multiple independent local users at the same time
cringes in citrix
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.