diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-10 14:46:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-10 14:46:58 +0000 |
commit | 101ca36412b3e7b8851b6b48a4f6cbc17d9f9eff (patch) | |
tree | a846c60f7c2a7df17b694deba92e7f6df3bbb882 /plugins/UserInfoEx/Flags | |
parent | a3fdadd09f12f6b246b11a5156bf6f0358e9a5f8 (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/UserInfoEx/Flags')
-rw-r--r-- | plugins/UserInfoEx/Flags/svc_flags.cpp | 8 | ||||
-rw-r--r-- | plugins/UserInfoEx/Flags/svc_flagsicons.cpp | 15 |
2 files changed, 11 insertions, 12 deletions
diff --git a/plugins/UserInfoEx/Flags/svc_flags.cpp b/plugins/UserInfoEx/Flags/svc_flags.cpp index 58fe8eec24..49435ec5c0 100644 --- a/plugins/UserInfoEx/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/Flags/svc_flags.cpp @@ -266,7 +266,7 @@ static void CALLBACK SetExtraImage(LPARAM lParam) { HICON hIcon=LoadFlag(countryNumber); // Returned HICON SHOULDN'T be destroyed, it is managed by IcoLib
if(hIcon!=NULL) {
phExtraImageList[index]=(HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON,(WPARAM)hIcon,0);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0); /* does NULL check */
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
}
}
iec.hImage=phExtraImageList[index];
@@ -502,7 +502,7 @@ MsgWndData::FlagsIconSet() { /* copy icon as status icon API will call DestroyIcon() on it */
hIcon = LoadFlagIcon(m_contryID);
sid.hIcon = (hIcon!=NULL)?CopyIcon(hIcon):NULL;
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0); /* does NULL check */
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
hIcon = sid.hIcon;
sid.dwId = (DWORD)m_contryID;
sid.hIconDisabled = sid.hIcon/*NULL*/;
@@ -565,14 +565,14 @@ IconList::~IconList() { // const char *pszName; // [Optional] Name of an icon registered with icolib to be used in GUI.
static __inline int MessageAPI_AddIcon(const char* pszName, const char* szModul/*StatusIconData *sid*/,int ID, int flags, const char* szTooltip)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON,(WPARAM)0/* =small 1=big*/,(LPARAM)pszName);
+ HICON hIcon = Skin_GetIcon(pszName);
StatusIconData sid = {0};
sid.cbSize = sizeof(sid);
sid.szModule = (char*)szModul;
sid.dwId = (DWORD)ID;
sid.hIcon = (hIcon!=NULL)?CopyIcon(hIcon):NULL;
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0); /* does NULL check */
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
// sid.hIconDisabled = sid.hIcon/*NULL*/;
sid.flags = 0;
sid.szTooltip = Translate((char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER,ID,0));
diff --git a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp index 34fec69c39..a765b8e8f8 100644 --- a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp @@ -141,11 +141,11 @@ HICON LoadFlag(int countryNumber) char szId[20],*szCountry;
/* create identifier */
szCountry=(char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER,countryNumber,0);
- if(szCountry==NULL) {
+ if(szCountry == NULL)
szCountry=(char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER,countryNumber=0xFFFF,0);
- }
+
wsprintfA(szId,(countryNumber==0xFFFF)?"%s_0x%X":"%s_%i","flags",countryNumber); /* buffer safe */
- return (HICON)CallService(MS_SKIN2_GETICON,(WPARAM)0/* =small 1=big*/,(LPARAM)szId);
+ return Skin_GetIcon(szId);
}
int CountryNumberToIndex(int countryNumber)
@@ -431,7 +431,7 @@ VOID InitIcons() skid.hDefaultIcon=ImageList_ExtractIcon(NULL, himl, index);
index = CountryNumberToIndex(countries[i].id);
- phIconHandles[index]=(HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&skid);
+ phIconHandles[index] = Skin_AddIcon(&skid);
if(skid.hDefaultIcon!=NULL) DestroyIcon(skid.hDefaultIcon);
mir_free(skid.ptszDescription); skid.ptszDescription = NULL;
}
@@ -446,12 +446,11 @@ VOID InitIcons() VOID UninitIcons()
{
- int i;
- char szId[20];
- for(i=0;i<nCountriesCount;++i) {
+ for(int i=0;i<nCountriesCount;++i) {
/* create identifier */
+ char szId[20];
wsprintfA(szId,(countries[i].id==0xFFFF)?"%s0x%X":"%s%i","flags_",countries[i].id); /* buffer safe */
- CallService(MS_SKIN2_REMOVEICON,0,(LPARAM)&szId);
+ Skin_RemoveIcon(szId);
}
mir_free(phIconHandles); /* does NULL check */
}
|