| 16009 | |
| 16010 | |
| 16011 | ResultType 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 |
nothing calls this directly
no outgoing calls
no test coverage detected