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

Function WinGetControlList

source/script2.cpp:2954–2967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2952
2953
2954void WinGetControlList(ResultToken &aResultToken, HWND aTargetWindow, bool aFetchHWNDs)
2955// Caller must ensure that aTargetWindow is non-NULL and valid.
2956// Every control is fetched rather than just a list of distinct class names (possibly with a
2957// second script array containing the quantity of each class) because it's conceivable that the
2958// z-order of the controls will be useful information to some script authors.
2959{
2960 control_list_type cl; // A big struct containing room to store class names and counts for each.
2961 if ( !(cl.target_array = Array::Create()) )
2962 _f_throw_oom;
2963 CL_INIT_CONTROL_LIST(cl)
2964 cl.fetch_hwnds = aFetchHWNDs;
2965 EnumChildWindows(aTargetWindow, EnumChildGetControlList, (LPARAM)&cl);
2966 _f_return(cl.target_array);
2967}
2968
2969
2970

Callers 1

BIF_DECLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected