Skip to content

Instantly share code, notes, and snippets.

@sidola
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save sidola/7d84f313e1dc8cf79e53 to your computer and use it in GitHub Desktop.

Select an option

Save sidola/7d84f313e1dc8cf79e53 to your computer and use it in GitHub Desktop.
AHK - Sets a GUI as a child to a parent, via parent window-name
SetParentByTitle(Window_Title_Text, Gui_Number) ; F
{
WinGetTitle, Window_Title_Text_Complete, %Window_Title_Text%
Parent_Handle := DllCall( "FindWindowEx", "uint",0, "uint",0, "uint",0, "str", Window_Title_Text_Complete)
Gui, %Gui_Number%: +LastFound
Return DllCall( "SetParent", "uint", WinExist(), "uint", Parent_Handle )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment