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/Sessions/Src/Utils.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/Sessions/Src/Utils.cpp')
-rw-r--r-- | plugins/Sessions/Src/Utils.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 93e7849c2c..97c1d7dc95 100644 --- a/plugins/Sessions/Src/Utils.cpp +++ b/plugins/Sessions/Src/Utils.cpp @@ -526,16 +526,19 @@ BYTE IsMarkedUserDefSession(int ses_count) return DBGetContactSettingByte(NULL, __INTERNAL_NAME, szSessionName, 0);
}
-HANDLE AddIcon(HICON icon, char *name, TCHAR *description)
+HANDLE AddIcon(char *name, char *description, int idx)
{
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.flags = SIDF_ALL_TCHAR;
- sid.ptszSection = _T(__INTERNAL_NAME);
+ TCHAR tszPath[MAX_PATH];
+ GetModuleFileName(hinstance, tszPath, SIZEOF(tszPath));
+
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.flags = SIDF_PATH_TCHAR;
+ sid.pszSection = __INTERNAL_NAME;
sid.cx = sid.cy = 16;
- sid.ptszDescription = description;
+ sid.pszDescription = description;
sid.pszName = name;
- sid.hDefaultIcon = icon;
+ sid.ptszDefaultFile = tszPath;
+ sid.iDefaultIndex = -idx;
return Skin_AddIcon( &sid);
}
|