삽질/Delphi
[Delphi] 최상위 윈도우가 전체화면인지 확인하기
푸딩s
2011. 5. 16. 11:58
function IsMaxWindow: boolean;
var
Hnd: HWND;
Rect: TRect;
begin
Result := False;
Hnd := GetForegroundWindow(); // 현재 작업중인 윈도우를 알아내는 함수
GetWindowRect(Hnd, Rect);
if (Rect.Left <> Rect.Top) then
exit;
if (Rect.Right = Screen.Width) and (Rect.Bottom = Screen.Height) then
Result := True; // 전체화면
end;