2011-08-10 3 views

Répondre

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

Puis vérifiez si cette fenêtre n'est pas de bureau ou de shell. Simple si l'instruction.

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

Ceci est écrit sans test.

+0

Merci beaucoup, ce très aider! – lebron2323

1

Une pleine mise en œuvre de la réponse de Hooch:

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); 
} 
Questions connexes