Retrieves the Gui object of a GUI window associated with the specified HWND.
GuiObj := GuiFromHwnd(Hwnd , RecurseParent := false)
The window handle (HWND) of a GUI window. Such window could be created with Gui.New.
Type: Integer (boolean)
If this parameter is 1 (true), the closest parent to the specified HWND that is a GUI is automatically searched for and retrieved.
This function returns a reference to an existing Gui object. This object provides methods and properties for creating and managing windows, and creating controls.
For example, a HWND of a GUI window can be retrieved via Gui.Hwnd, WinExist or WinGetID.
Gui.New, Gui object, GuiControl object, GuiCtrlFromHwnd, Control Types, ListView, TreeView, Menu object, Control functions, MsgBox, FileSelect, DirSelect
MyGui := Gui.New(, "Title of Window") MyGui.Add("Text",, "Some text to display.") MyGui.Show() MsgBox(GuiFromHwnd(MyGui.Hwnd).Title)