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/AutoShutdown | |
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/AutoShutdown')
-rw-r--r-- | plugins/AutoShutdown/src/utils.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index c6dd625531..90e3356cfe 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -274,20 +274,18 @@ int FontService_GetColor(const TCHAR *pszSection,const TCHAR *pszDescription,COL HANDLE IcoLib_AddIconRes(const char *pszDbName,const TCHAR *pszSection,const TCHAR *pszDesc,HINSTANCE hInst,WORD idRes,BOOL fLarge)
{
- SKINICONDESC sid;
TCHAR szFileName[MAX_PATH];
- sid.cbSize=sizeof(SKINICONDESC);
- sid.pszName=(char*)pszDbName;
- sid.ptszSection=(TCHAR*)pszSection;
- sid.ptszDescription=(TCHAR*)pszDesc;
- sid.ptszDefaultFile=szFileName;
- sid.iDefaultIndex=-idRes;
- sid.cx=GetSystemMetrics(fLarge?SM_CXICON:SM_CXSMICON);
- sid.cy=GetSystemMetrics(fLarge?SM_CYICON:SM_CYSMICON);
- sid.hDefaultIcon=NULL;
- sid.flags=SIDF_SORTED|SIDF_ALL_TCHAR;
- if(!GetModuleFileName(hInst,szFileName,SIZEOF(szFileName)))
- return NULL;
+ GetModuleFileName(hInst,szFileName,SIZEOF(szFileName));
+
+ SKINICONDESC sid = { sizeof(sid) };
+ sid.pszName = (char*)pszDbName;
+ sid.ptszSection = (TCHAR*)pszSection;
+ sid.ptszDescription = (TCHAR*)pszDesc;
+ sid.ptszDefaultFile = szFileName;
+ sid.iDefaultIndex = -idRes;
+ sid.cx = GetSystemMetrics(fLarge?SM_CXICON:SM_CXSMICON);
+ sid.cy = GetSystemMetrics(fLarge?SM_CYICON:SM_CYSMICON);
+ sid.flags = SIDF_SORTED | SIDF_ALL_TCHAR;
return Skin_AddIcon(&sid);
}
|