del
//声明:
GetTopWindow(
  hWnd: HWND; {指定的窗口句柄}
): HWND;      {失败返回0; 成功返回最顶层的子窗口句柄}

这和用 GetWindow 函数使用 GW_CHILD 参数时应该是一样的, 测试一下:
var
  h1,h2: HWND;
begin
  h1 := GetTopWindow(GetDesktopWindow);
  h2 := GetWindow(GetDesktopWindow, GW_CHILD);
  ShowMessage(Format(\'%d,%d\',[h1,h2])); {132540,132540}
end;

分类:

技术点:

相关文章: