是否有任何功能,或者我必须遍历我前面的所有窗口并检测它们是否与我的窗口重叠?
由于
答案 0 :(得分:2)
您是否尝试将GetForegroundWindow()返回的HWND与应用程序的HWND进行比较? (http://msdn.microsoft.com/en-us/library/ms633505%28VS.85%29.aspx)
更清楚:
hwndForeground = GetForegroundWindow();
if (hwndForeground != myapp)
//Compare if rect of (hwndForeground) is overlapping rect of (myapp)