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/KeyboardNotify/src/ignore.cpp | 14 +++++++------- plugins/KeyboardNotify/src/stdafx.h | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'plugins/KeyboardNotify/src') diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index bf8f81bdcf..fd9808108c 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -195,13 +195,13 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM, LPARAM lPa TranslateDialogDefault(hwndDlg); { HIMAGELIST hIml=ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 3+IGNOREEVENT_MAX, 3+IGNOREEVENT_MAX); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_SMALLDOT)); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_FILLEDBLOB)); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_EMPTYBLOB)); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_EVENT_URL)); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_EVENT_FILE)); - ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_MIRANDA)); + ImageList_AddSkinIcon(hIml, SKINICON_OTHER_SMALLDOT); + ImageList_AddSkinIcon(hIml, SKINICON_OTHER_FILLEDBLOB); + ImageList_AddSkinIcon(hIml, SKINICON_OTHER_EMPTYBLOB); + ImageList_AddSkinIcon(hIml, SKINICON_EVENT_MESSAGE); + ImageList_AddSkinIcon(hIml, SKINICON_EVENT_URL); + ImageList_AddSkinIcon(hIml, SKINICON_EVENT_FILE); + ImageList_AddSkinIcon(hIml, SKINICON_OTHER_MIRANDA); SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml); for (int i=0; i < _countof(hIcons); i++) hIcons[i] = ImageList_GetIcon(hIml, 1+i, ILD_NORMAL); diff --git a/plugins/KeyboardNotify/src/stdafx.h b/plugins/KeyboardNotify/src/stdafx.h index 3b01954284..cce961e02f 100644 --- a/plugins/KeyboardNotify/src/stdafx.h +++ b/plugins/KeyboardNotify/src/stdafx.h @@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #include #include #include -- cgit v1.2.3