summaryrefslogtreecommitdiff
path: root/plugins/Utils/mir_icons.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-10 14:46:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-10 14:46:58 +0000
commit101ca36412b3e7b8851b6b48a4f6cbc17d9f9eff (patch)
treea846c60f7c2a7df17b694deba92e7f6df3bbb882 /plugins/Utils/mir_icons.cpp
parenta3fdadd09f12f6b246b11a5156bf6f0358e9a5f8 (diff)
bitmap operations were removed from TopToolBar and replaced with IcoLib
git-svn-id: http://svn.miranda-ng.org/main/trunk@379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Utils/mir_icons.cpp')
-rw-r--r--plugins/Utils/mir_icons.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/Utils/mir_icons.cpp b/plugins/Utils/mir_icons.cpp
index 1fb2c0ef82..bab0674d35 100644
--- a/plugins/Utils/mir_icons.cpp
+++ b/plugins/Utils/mir_icons.cpp
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
+#include <Windows.h>
#include "mir_icons.h"
@@ -26,8 +27,6 @@ Boston, MA 02111-1307, USA.
extern HINSTANCE hInst;
-
-
HICON IcoLib_LoadIcon(const char *iconName, BOOL copy)
{
if (!ServiceExists(MS_SKIN2_GETICON))
@@ -59,13 +58,12 @@ void IcoLib_ReleaseIcon(HICON hIcon)
}
-void IcoLib_Register(char *name, TCHAR *section, TCHAR *description, int id)
+HANDLE IcoLib_Register(char *name, TCHAR *section, TCHAR *description, int id)
{
HICON hIcon = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) name);
- if (hIcon != NULL)
- {
+ if (hIcon != NULL) {
CallService(MS_SKIN2_RELEASEICON, (WPARAM) hIcon, 0);
- return;
+ return NULL;
}
SKINICONDESC sid = {0};
@@ -77,10 +75,11 @@ void IcoLib_Register(char *name, TCHAR *section, TCHAR *description, int id)
int cx = GetSystemMetrics(SM_CXSMICON);
sid.hDefaultIcon = (HICON) LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, cx, cx, LR_DEFAULTCOLOR | LR_SHARED);
-
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ HANDLE hRes = Skin_AddIcon(&sid);
if (sid.hDefaultIcon)
DestroyIcon(sid.hDefaultIcon);
+
+ return hRes;
}