summaryrefslogtreecommitdiff
path: root/include
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 /include
parent48de7daae4384c86681f89255b63631cb832097c (diff)
CMPluginBase::addImgListIcon: new helper to safely add an icolib icon to HIMAGELIST
Diffstat (limited to 'include')
-rw-r--r--include/m_icolib.h6
-rw-r--r--include/newpluginapi.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/include/m_icolib.h b/include/m_icolib.h
index b63fc4abf0..e8a0ec3704 100644
--- a/include/m_icolib.h
+++ b/include/m_icolib.h
@@ -111,6 +111,12 @@ MIR_APP_DLL(void) Window_SetProtoIcon_IcoLib(HWND hWnd, const char *szProto, i
MIR_APP_DLL(void) Window_FreeIcon_IcoLib(HWND hWnd);
///////////////////////////////////////////////////////////////////////////////
+// Helper to add an icolib's icon to a HIMAGELIST
+
+MIR_APP_DLL(int) ImageList_AddSkinIcon(HIMAGELIST hIml, int iconId);
+MIR_APP_DLL(int) ImageList_AddProtoIcon(HIMAGELIST hIml, const char *szProto, int iconId);
+
+///////////////////////////////////////////////////////////////////////////////
// Icons' change notification event
#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged"
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index 6be344e66c..153da7936e 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -25,6 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_NEWPLUGINAPI_H__
#define M_NEWPLUGINAPI_H__
+#if !defined(HIMAGELIST)
+typedef struct _IMAGELIST* HIMAGELIST;
+#endif
+
#include <m_core.h>
#include <m_database.h>
@@ -176,6 +180,7 @@ public:
void debugLogW(LPCWSTR wszFormat, ...);
__forceinline void addIcolib(HANDLE hIcolib) { m_arIcons.insert((IcolibItem*)hIcolib); }
+ int addImgListIcon(HIMAGELIST himl, int iconId);
HICON getIcon(int iconId, bool big = false);
HANDLE getIconHandle(int iconId);
void releaseIcon(int iconId, bool big = false);