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

Method LV_SetImageList

source/script2.cpp:16011–16029  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16009
16010
16011ResultType GuiControlType::LV_SetImageList(ResultToken &aResultToken, int aID, int aFlags, ExprTokenType *aParam[], int aParamCount)
16012// Returns (MSDN): "handle to the image list previously associated with the control if successful; NULL otherwise."
16013// Parameters:
16014// 1: HIMAGELIST obtained from somewhere such as IL_Create().
16015// 2: Optional: Type of list.
16016{
16017 // Caller has ensured that there is at least one incoming parameter:
16018 HIMAGELIST himl = (HIMAGELIST)ParamIndexToInt64(0);
16019 int list_type;
16020 if (!ParamIndexIsOmitted(1))
16021 list_type = ParamIndexToInt(1);
16022 else // Auto-detect large vs. small icons based on the actual icon size in the image list.
16023 {
16024 int cx, cy;
16025 ImageList_GetIconSize(himl, &cx, &cy);
16026 list_type = (cx > GetSystemMetrics(SM_CXSMICON)) ? LVSIL_NORMAL : LVSIL_SMALL;
16027 }
16028 _o_return((size_t)ListView_SetImageList(hwnd, himl, list_type));
16029}
16030
16031
16032

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected