diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-30 13:01:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-30 13:01:44 +0000 |
commit | b947df9fed0907995842d4c7121157508feac65e (patch) | |
tree | c43d627233d6a67ae5f1f35ddb8e03885d27c99c /protocols/Weather/weather_icons.cpp | |
parent | 657e7fa72958bd46d5319ec839f4270bd065f3f1 (diff) |
Weather Unicode
git-svn-id: http://svn.miranda-ng.org/main/trunk@230 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Weather/weather_icons.cpp')
-rw-r--r-- | protocols/Weather/weather_icons.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/protocols/Weather/weather_icons.cpp b/protocols/Weather/weather_icons.cpp index e1b95c4405..ada253bb07 100644 --- a/protocols/Weather/weather_icons.cpp +++ b/protocols/Weather/weather_icons.cpp @@ -45,33 +45,29 @@ static iconList[] = void InitIcons(void)
{
- char szFile[MAX_PATH];
char szSettingName[100];
- SKINICONDESC sid = {0};
- unsigned i;
-
+ TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszDefaultFile = szFile;
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.ptszDefaultFile = szFile;
sid.pszName = szSettingName;
sid.pszSection = WEATHERPROTONAME;
+ sid.flags = SIDF_PATH_TCHAR;
- for (i = 0; i < SIZEOF(iconList); i++)
- {
- mir_snprintf(szSettingName, sizeof( szSettingName ), "%s_%s", WEATHERPROTONAME, iconList[i].szName);
+ for (int i = 0; i < SIZEOF(iconList); i++) {
+ mir_snprintf(szSettingName, SIZEOF( szSettingName ), "%s_%s", WEATHERPROTONAME, iconList[i].szName);
sid.pszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
-}
-
+} }
HICON LoadIconEx(const char* name, BOOL big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", WEATHERPROTONAME, name);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", WEATHERPROTONAME, name);
return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
}
|