2011-08-10 6 views

답변

8
hWnd = GetForegroundWindow(); 
RECT appBounds; 
RECT rc; 
GetWindowRect(GetDesktopWindow(), &rc); 

그런 다음 해당 창이 데스크탑이나 쉘이 아닌지 확인하십시오. 명령 인 경우 단순합니다.

if(hWnd =! GetDesktopWindow() && hWnd != GetShellWindow()) 
{ 
    GetWindowRect(hWnd, &appBounds); 
    // Now you just have to compare rc to appBounds 
} 

이것은 테스트없이 작성되었습니다.

+0

고마워, 이것은 매우 도움이! – lebron2323

1

술로의 대답의 전체 구현 :

bool isFullscreen(HWND window) 
{ 
    RECT a, b; 
    GetWindowRect(window, &a); 
    GetWindowRect(GetDesktopWindow(), &b); 
    return (a.left == b.left && 
      a.top == b.top && 
      a.right == b.right && 
      a.bottom == b.bottom); 
} 
관련 문제