Jeff Latimer lats@yless4u.com.au writes:
The comment in the code indicates that the foreground window is active window of the active thread. Seems logical the active window handle should be returned at the same time.
No, the active window is per-thread, you can't return the active window of some other thread.