diff options
author | George Hazan <george.hazan@gmail.com> | 2012-08-16 09:45:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-08-16 09:45:49 +0000 |
commit | 130c2312fc836432ede2202f3ccb45624dca559f (patch) | |
tree | 9d91e9c032d86983f69c4d095eb9f8c2ae04b5ce /plugins/ExtraIcons/src/usedIcons.cpp | |
parent | d1b34f9184e45f402d87db5bd9371e15bee9c50b (diff) |
fix for icolib-based extra icons
git-svn-id: http://svn.miranda-ng.org/main/trunk@1478 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExtraIcons/src/usedIcons.cpp')
-rw-r--r-- | plugins/ExtraIcons/src/usedIcons.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/ExtraIcons/src/usedIcons.cpp b/plugins/ExtraIcons/src/usedIcons.cpp index 7f7b84b5b7..1a7ccf7492 100644 --- a/plugins/ExtraIcons/src/usedIcons.cpp +++ b/plugins/ExtraIcons/src/usedIcons.cpp @@ -26,7 +26,7 @@ struct Icon HANDLE hImage;
Icon(const char *icolibName) :
- name(icolibName), refCount(0), hImage((HANDLE) -1)
+ name(icolibName), refCount(0), hImage(INVALID_HANDLE_VALUE)
{
}
};
@@ -53,15 +53,12 @@ static Icon * FindIcon(const char *icolibName) icon = &usedIcons[usedIcons.size() - 1];
}
- if (icon->hImage == NULL)
+ if (icon->hImage == INVALID_HANDLE_VALUE)
{
HICON hIcon = IcoLib_LoadIcon(icon->name.c_str());
if (hIcon != NULL)
{
icon->hImage = (HANDLE) CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM) hIcon, 0);
- if (icon->hImage == (HANDLE) -1)
- icon->hImage = NULL;
-
Skin_ReleaseIcon(hIcon);
}
}
@@ -105,6 +102,6 @@ void ResetIcons() usedIcons.erase(std::remove_if(usedIcons.begin(), usedIcons.end(), NotUsedIcon), usedIcons.end());
for (unsigned int i = 0; i < usedIcons.size(); ++i)
- usedIcons[i].hImage = (HANDLE) -1;
+ usedIcons[i].hImage = INVALID_HANDLE_VALUE;
}
|