diff options
author | George Hazan <george.hazan@gmail.com> | 2012-12-01 13:25:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-12-01 13:25:11 +0000 |
commit | 854959cbc0a1bad2c086214be4d1a829b17a61f3 (patch) | |
tree | ee3de50f4b4e57f54ae20d139f97fa469ff90d34 /plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp | |
parent | 73ddc73d92675399e4619758d4b0881418de0a6d (diff) |
icolib: icon creation quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2588 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index fe4ce708bb..f1b8232871 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -415,25 +415,25 @@ VOID InitIcons() phIconHandles = (HANDLE*)mir_alloc(nCountriesCount*sizeof(HANDLE));
if (phIconHandles != NULL) {
char szId[20];
- SKINICONDESC skid = { sizeof(skid) };
- skid.ptszSection = LPGENT("Country Flags");
- skid.pszName = szId; // name to refer to icon when playing and in db
- skid.cx = GetSystemMetrics(SM_CXSMICON);
- skid.cy = GetSystemMetrics(SM_CYSMICON);
- skid.flags = SIDF_SORTED | SIDF_TCHAR;
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.ptszSection = LPGENT("Country Flags");
+ sid.pszName = szId; // name to refer to icon when playing and in db
+ sid.cx = GetSystemMetrics(SM_CXSMICON);
+ sid.cy = GetSystemMetrics(SM_CYSMICON);
+ sid.flags = SIDF_SORTED | SIDF_TCHAR;
for (int i=0; i < nCountriesCount; i++) {
- skid.ptszDescription = mir_a2t(LPGEN(countries[i].szName));
+ sid.ptszDescription = mir_a2t(LPGEN(countries[i].szName));
/* create identifier */
wsprintfA(szId,(countries[i].id==0xFFFF)?"%s0x%X":"%s%i","flags_",countries[i].id); /* buffer safe */
int index = CountryNumberToBitmapIndex(countries[i].id);
/* create icon */
- skid.hDefaultIcon=ImageList_ExtractIcon(NULL, himl, index);
+ sid.hDefaultIcon = ImageList_ExtractIcon(NULL, himl, index);
index = CountryNumberToIndex(countries[i].id);
- phIconHandles[index] = Skin_AddIcon(&skid);
- if(skid.hDefaultIcon!=NULL) DestroyIcon(skid.hDefaultIcon);
- mir_free(skid.ptszDescription); skid.ptszDescription = NULL;
+ phIconHandles[index] = Skin_AddIcon(&sid);
+ if(sid.hDefaultIcon!=NULL) DestroyIcon(sid.hDefaultIcon);
+ mir_free(sid.ptszDescription); sid.ptszDescription = NULL;
}
}
ImageList_Destroy(himl);
|