MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / GetEnumItem

Method GetEnumItem

source/script_gui.cpp:163–178  ·  view source on GitHub ↗

Enumerator for GuiType objects.

Source from the content-addressed store, hash-verified

161
162// Enumerator for GuiType objects.
163ResultType GuiType::GetEnumItem(UINT &aIndex, Var *aOutputVar1, Var *aOutputVar2, int aVarCount)
164{
165 if (aIndex >= mControlCount) // Use >= vs. == in case the Gui was destroyed.
166 return CONDITION_FALSE;
167 GuiControlType* ctrl = mControl[aIndex];
168 if (aVarCount < 2) // `for x in myGui` or `[myGui*]`
169 {
170 aOutputVar2 = aOutputVar1; // Return the more useful value in single-var mode: the control object.
171 aOutputVar1 = nullptr;
172 }
173 if (aOutputVar1)
174 aOutputVar1->AssignHWND(ctrl->hwnd);
175 if (aOutputVar2)
176 aOutputVar2->Assign(ctrl);
177 return CONDITION_TRUE;
178}
179
180
181ObjectMember GuiType::sMembers[] =

Callers

nothing calls this directly

Calls 2

AssignHWNDMethod · 0.80
AssignMethod · 0.45

Tested by

no test coverage detected