Reputation: 105037
Is there any function, or I'll have to iterate through all windows that are in front of mine and detect if they overlap my window?
Thanks
Upvotes: 2
Views: 124
Reputation: 133
Did you try comparing the HWND returned by GetForegroundWindow() with the HWND of your application? (http://msdn.microsoft.com/en-us/library/ms633505%28VS.85%29.aspx)
To be more clear:
hwndForeground = GetForegroundWindow();
if (hwndForeground != myapp)
//Compare if rect of (hwndForeground) is overlapping rect of (myapp)
Upvotes: 2