0

I developing a small program that I want working as a widget, and would like to display it only when no window has focus - or when the desktop window has focus.

My best chance now is finding whether GetFocus() returns NULL but this is not working as suspected. I've also tried with GetForegroundWindow() and the windows returned with GetGUIThreadInfo().

Thank you.

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by strmstn
1

Nevermind, I finally managed to figure it out. For those wondering:

if(GetShellWindow() == GetForegroundWindow())
   //Then the desktop is in focus
Votes + Comments
nice one :)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.