本文整理自网络,侵删。
WinAPI: GetTopWindow - 获取指定窗口的子窗口中最顶层的窗口句柄//声明: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;
相关阅读 >>
Delphixe4 版本中,已针对移动平台 引入了 arc 模型
Delphi firemonkey里触发home按键被按下的事件
更多相关阅读请进入《Delphi》频道 >>