Using this command for the first time to check for a ComboBox I get a confusing result; the class part of ClassNN contains "Edit". I know that a ComboBox contains an Edit as a child control, but I always thought that GuiControlGet other than ControlGet will retrieve informations about a GuiControl, i.e. a ComboBox in this case. Also, the returned ClassNN won't be accepted as valid for subsequent GuiControlGet or GuiControl commands. Does this make any sense?
#NoEnv SetBatchLines, -1 Gui, Margin, 20, 20 Gui, Add, ComboBox, w500 r5 vCBBVar hwndHCBB Choose1, ComboBox|2|3|4|5 Gui, Add, Edit, w500 vEditVar hwndHEDit, Edit Gui, Add, ListView, w500 r6 Grid, Command|OutputVar|ErrorLevel LV_ModifyCol(1, 300) LV_ModifyCol(2, 100) LV_ModifyCol(3, "AutoHdr") Gui, Show, , ComboBox GuiControlGet, ClassNN, Focus LV_Add("", "GuiControlGet, ClassNN, Focus", ClassNN ? ClassNN : "!!! Empty !!!", ErrorLevel) GuiControlGet, CtrlVar, FocusV LV_Add("", "GuiControlGet, CtrlVar, FocusV", CtrlVar ? CtrlVar : "!!! Empty !!!", ErrorLevel) GuiControlGet, HCTRL, HWND, %ClassNN% LV_Add("", "GuiControlGet, HCTRL, HWND, %ClassNN%", HCTRL ? HCTRL : "!!! Empty !!!", ErrorLevel) GuiControlGet, HCTRL, HWND, %CtrlVar% LV_Add("", "GuiControlGet, HCTRL, HWND, %CtrlVar%", HCTRL ? HCTRL : "!!! Empty !!!", ErrorLevel) GuiControlGet, VarName, Name, %ClassNN% LV_Add("", "GuiControlGet, VarName, Name, %ClassNN%", VarName ? VarName : "!!! Empty !!!", ErrorLevel) GuiControl, , %ClassNN%, Hello world! LV_Add("", "GuiControl, , %ClassNN%, Hello world!", "N/A", ErrorLevel) Return GuiClose: ExitApp
Sorry, if this has been already asked and answered!