function GetShellWindow:HWND;stdcall;
external user32 Name 'GetShellWindow';
// detect desktop is present
// those are different on specific conditions, like slideshow, win10 special features, and maybe third party tools installed for desktop handling
function IsDesktopWindow(AHandle: HWND): Boolean;
var
AppClassName: array[0..255] of char;
ChildHwnd: HWND;
begin
Result := False;
if AHandle = GetDesktopWindow then Result := True
else if AHandle = GetShellWindow then Result := True
else
begin
GetClassName(AHandle, AppClassName, 255);
if AppClassName = 'WorkerW' then
begin
// it should have a children with 'SHELLDLL_DefView' present
ChildHwnd := FindWindowEx(AHandle, 0, 'SHELLDLL_DefView', nil);
if ChildHwnd <> 0 then
begin
//if DetectFullScreenApp(AHandle) then
Result := True;
end;
end;
end;
end;
Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号
执行时间: 0.17172980308533 seconds