devoured elysium
devoured elysium

Reputation: 105037

Is there a way to verify that the current window of another program is totally visible?

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

Answers (1)

Marcelo
Marcelo

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

Related Questions