summaryrefslogtreecommitdiff
path: root/plugins/NoHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-13 00:11:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-13 00:11:59 +0300
commitfee3a74e7429552ebbfe7ae9c14a4f6c25156fb6 (patch)
treee05460a85875a1c5f59b6244ac0e412095ac71b9 /plugins/NoHistory/src
parent48de7daae4384c86681f89255b63631cb832097c (diff)
CMPluginBase::addImgListIcon: new helper to safely add an icolib icon to HIMAGELIST
Diffstat (limited to 'plugins/NoHistory/src')
-rw-r--r--plugins/NoHistory/src/options.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 3e754678fa..3107787b21 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -102,9 +102,10 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
hwndList = GetDlgItem(hwndDlg, IDC_LIST);
{
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
- ImageList_AddIcon(hIml, g_plugin.getIcon(IDI_HKEEP));
- ImageList_AddIcon(hIml, g_plugin.getIcon(IDI_HREMOVE));
+ g_plugin.addImgListIcon(hIml, IDI_HKEEP);
+ g_plugin.addImgListIcon(hIml, IDI_HREMOVE);
SendMessage(hwndList, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml);
+
SendDlgItemMessage(hwndDlg, IDC_PIC_KEEP, STM_SETICON, (WPARAM)g_plugin.getIcon(IDI_HKEEP), 0);
SendDlgItemMessage(hwndDlg, IDC_PIC_REMOVE, STM_SETICON, (WPARAM)g_plugin.getIcon(IDI_HREMOVE), 0);
}