I made some attempts with Gui, Add, Custom. It fails with the message "Unregistered window class".tidbit wrote:though, any reason you didn't use gui,add,custom?
The reason, apparently, is that TreeList is not registered with CS_GLOBALCLASS. AutoHotkey checks the return value of GetClassInfoEx without passing a handle to rasdlg.dll.
Code: Select all
VarSetCapacity(WNDCLASSEX, A_PtrSize == 8 ? 80 : 48, 0)
hModule := DllCall("LoadLibrary", "Str", "rasdlg.dll", "Ptr")
MsgBox % DllCall("GetClassInfoEx", "Ptr", hModule, "Str", "TreeList", "Ptr", &WNDCLASSEX)
/*
; Scintilla has CS_GLOBALCLASS and can be created with "Gui, Add, Custom".
DllCall("LoadLibrary", "Str", "SciLexer.dll", "Ptr")
MsgBox % DllCall("GetClassInfoEx", "Ptr", 0, "Str", "Scintilla", "Ptr", &WNDCLASSEX)
*/