From 75b1ff75c42644eb36552762652e4b0c9ff071bc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Nov 2012 14:11:01 +0000 Subject: final switch to the typed icolib api git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CountryFlags/src/extraimg.cpp | 4 ++-- plugins/CountryFlags/src/icons.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/CountryFlags/src') diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 9cf8c4c28a..7c633ef8d1 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -76,7 +76,7 @@ static void CALLBACK SetExtraImage(LPARAM lParam) HICON hIcon = LoadFlagIcon(countryNumber); if (hIcon != NULL) phExtraImages[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=phExtraImages[index]; } @@ -170,7 +170,7 @@ static void FASTCALL SetStatusIcon(HANDLE hContact,int countryNumber) /* copy icon as status icon API will call DestroyIcon() on it */ hIcon = LoadFlagIcon(countryNumber); 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; /* ensure status icon is registered */ sid.dwId = countryNumber; diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp index 74f7287f03..5fb6a54a6d 100644 --- a/plugins/CountryFlags/src/icons.cpp +++ b/plugins/CountryFlags/src/icons.cpp @@ -83,7 +83,7 @@ static int FASTCALL CountryNumberToBitmapIndex(int countryNumber) return i; if (countryNumber >BitmapIndexMap[i]) - low=i+1; + low=i+1; else high=i-1; } @@ -152,7 +152,7 @@ HICON FASTCALL LoadFlagIcon(int countryNumber) char szId[20]; wsprintfA(szId, (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber); /* buffer safe */ - return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szId); + return Skin_GetIcon(szId); } int FASTCALL CountryNumberToIndex(int countryNumber) @@ -175,7 +175,7 @@ static INT_PTR ServiceLoadFlagIcon(WPARAM wParam,LPARAM lParam) if ((BOOL)lParam) { if (phIconHandles == NULL) return 0; - + return (INT_PTR)phIconHandles[CountryNumberToIndex((int)wParam)]; } /* return icon */ @@ -235,7 +235,7 @@ void InitIcons(void) /* register icons */ SKINICONDESC sid = { sizeof(sid) }; sid.pszName = szId; - sid.cx = GetSystemMetrics(SM_CXSMICON); + sid.cx = GetSystemMetrics(SM_CXSMICON); sid.cy = GetSystemMetrics(SM_CYSMICON); sid.flags = SIDF_SORTED; sid.pszSection = "Country Flags"; -- cgit v1.2.3