Du meinst vermutlich eine andere Anwendung, oder? Diese dürfte im Normalfall kaum mit Deiner MessageQueue verknüpft sein
Unter "Remarks" heißt es in meiner Hilfe weiter:
Zitat:
Remarks
Even if GetFocus returns NULL, another thread's queue may be associated with a window that has the keyboard focus.
Use the GetForegroundWindow function to retrieve the
handle to the window with which the user is currently working. You can associate your thread's message queue with the windows owned by another thread by using the AttachThreadInput function.