From fee3a74e7429552ebbfe7ae9c14a4f6c25156fb6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Apr 2019 00:11:59 +0300 Subject: CMPluginBase::addImgListIcon: new helper to safely add an icolib icon to HIMAGELIST --- plugins/HistorySweeperLight/src/options.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/HistorySweeperLight/src') diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index dc032a06b4..50db5990f5 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -163,12 +163,9 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) TranslateDialogDefault(hwndDlg); { HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 2, 2); + ImageList_AddSkinIcon(hIml, SKINICON_OTHER_SMALLDOT); - HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_SMALLDOT); - ImageList_AddIcon(hIml, hIcon); - IcoLib_ReleaseIcon(hIcon); - - hIcon = g_plugin.getIcon(IDI_ACT1); + HICON hIcon = g_plugin.getIcon(IDI_ACT1); ImageList_AddIcon(hIml, hIcon); SendDlgItemMessage(hwndDlg, IDC_ACT1, STM_SETICON, (WPARAM)hIcon, 0); -- cgit v1.2.3