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/AutoShutdown/src/utils.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'plugins/AutoShutdown/src/utils.cpp') diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index c0128f80d6..c6dd625531 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -116,7 +116,7 @@ char* GetWinErrorDescription(DWORD dwLastError) char *buf=NULL; DWORD flags=FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM; if(!FormatMessageA(flags,NULL,dwLastError,LANGIDFROMLCID((LCID)CallService(MS_LANGPACK_GETLOCALE,0,0)),(char*)&buf,0,NULL)) - if(GetLastError()==ERROR_RESOURCE_LANG_NOT_FOUND) + if(GetLastError()==ERROR_RESOURCE_LANG_NOT_FOUND) FormatMessageA(flags,NULL,dwLastError,0,(char*)&buf,0,NULL); return buf; } @@ -155,11 +155,11 @@ BOOL TimeStampToSystemTime(time_t timestamp,SYSTEMTIME *st) return TRUE; } -BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown) +BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown) { static BOOL fInited=FALSE; static int (WINAPI *pfnStrFromTimeInterval)(TCHAR*,UINT,DWORD,int); - static int (WINAPI *pfnGetDurationFormat)(LCID,DWORD,const SYSTEMTIME*,double,WCHAR*,WCHAR*,int); + static int (WINAPI *pfnGetDurationFormat)(LCID,DWORD,const SYSTEMTIME*,double,WCHAR*,WCHAR*,int); /* Init */ if(!fInited) { *(PROC*)&pfnGetDurationFormat=GetProcAddress(GetModuleHandleA("KERNEL32"),"GetDurationFormat"); @@ -185,7 +185,7 @@ BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown) return FALSE; } -BOOL GetFormatedDateTime(TCHAR *pszOut,int nSize,time_t timestamp,BOOL fShowDateEvenToday) +BOOL GetFormatedDateTime(TCHAR *pszOut,int nSize,time_t timestamp,BOOL fShowDateEvenToday) { SYSTEMTIME st,stNow; LCID locale; @@ -250,7 +250,7 @@ int FontService_RegisterColor(const char *pszDbModule,const char *pszDbName,cons ColourIDT cid; ZeroMemory(&cid,sizeof(cid)); cid.cbSize=sizeof(cid); - cid.defcolour=clrDefault; + cid.defcolour=clrDefault; lstrcpynA(cid.dbSettingsGroup,pszDbModule,sizeof(cid.dbSettingsGroup)); /* buffer safe */ lstrcpynA(cid.setting,pszDbName,sizeof(cid.setting)); /* buffer safe */ lstrcpyn(cid.group,pszSection,SIZEOF(cid.group)); /* buffer safe */ @@ -291,16 +291,6 @@ HANDLE IcoLib_AddIconRes(const char *pszDbName,const TCHAR *pszSection,const TCH return Skin_AddIcon(&sid); } -HICON IcoLib_GetIcon(const char *pszDbName) -{ - return (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)pszDbName); -} - -int IcoLib_ReleaseIcon(HICON hIcon) -{ - return CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0); -} - int SkinAddNewSoundBundled(const char *pszDbName,const char *pszSection,const char *pszDesc,const char *pszSubDir,const char *pszDefaultFile) { SKINSOUNDDESCEX ssd; -- cgit v1.2.3