api - GetGUIThreadInfo() fails on non-foreground thread -
according msdn:
to window keyboard focus on foreground queue or queue of thread, utilize getguithreadinfo function.
if phone call getguithreadinfo, passing 0 thread id, window has keyboard focus in foreground thread. want accomplish know window has keyboard focus on non-foreground thread. this, pass thread id of thread want "investigate", getguithreadinfo() returns zeros. if create thread foreground thread (i.e. activate window) - getguithreadinfo() works intended.
is there way info want - i.e. window keyboard focus not in foreground thread?
edit: foreground thread - thread owning foreground window. thread attached hardware input queue , 1 receiving messages when click buttons, move mouse, etc. likewise - non foreground thread thread owns windows not attached hardware input queue.
api winapi msdn
No comments:
Post a Comment