From a61354ca53d0a61dfcce006ce2e8eb05fd47dc51 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 Jun 2012 12:16:06 +0000 Subject: CountryFlags: plusified git-svn-id: http://svn.miranda-ng.org/main/trunk@542 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CountryFlags/flags.vcxproj | 22 +++++++++++----------- plugins/CountryFlags/flags.vcxproj.filters | 14 +++++++------- plugins/CountryFlags/icons.cpp | 4 ++-- plugins/CountryFlags/main.cpp | 26 +++++++------------------- 4 files changed, 27 insertions(+), 39 deletions(-) diff --git a/plugins/CountryFlags/flags.vcxproj b/plugins/CountryFlags/flags.vcxproj index c6e718b91c..9f2bc24012 100644 --- a/plugins/CountryFlags/flags.vcxproj +++ b/plugins/CountryFlags/flags.vcxproj @@ -76,7 +76,7 @@ Disabled Level3 ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;UNICODE;WIN32;_WINDOWS;_USRDLL;STRICT;FLAGS_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks EditAndContinue @@ -101,7 +101,7 @@ Disabled Level3 ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - _DEBUG;UNICODE;WIN64;_WINDOWS;_USRDLL;STRICT;FLAGS_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks @@ -126,7 +126,7 @@ Full Level3 ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;UNICODE;WIN32;_WINDOWS;_USRDLL;STRICT;ASSOCMGR_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions) Size @@ -153,7 +153,7 @@ Full Level3 ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - NDEBUG;UNICODE;WIN64;_WINDOWS;_USRDLL;STRICT;ASSOCMGR_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;FLAGS_EXPORTS;%(PreprocessorDefinitions) Size @@ -173,13 +173,13 @@ - - - - - - - + + + + + + + diff --git a/plugins/CountryFlags/flags.vcxproj.filters b/plugins/CountryFlags/flags.vcxproj.filters index 0b799465fd..1d3dd91efb 100644 --- a/plugins/CountryFlags/flags.vcxproj.filters +++ b/plugins/CountryFlags/flags.vcxproj.filters @@ -19,25 +19,25 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files diff --git a/plugins/CountryFlags/icons.cpp b/plugins/CountryFlags/icons.cpp index 82dea7cabc..3b456a4d11 100644 --- a/plugins/CountryFlags/icons.cpp +++ b/plugins/CountryFlags/icons.cpp @@ -105,7 +105,7 @@ static HICON FASTCALL ResizeIconCentered(HICON hIcon,int cx,int cy) if(GetObject(icoi.hbmColor,sizeof(bm),&bm) && bm.bmWidth<=cx && bm.bmHeight<=cy) { pt.x=(cx-bm.bmWidth)/2; pt.y=(cy-bm.bmHeight)/2; - hbmPrev=SelectObject(hdc,icoi.hbmColor); + hbmPrev = (HBITMAP)SelectObject(hdc, icoi.hbmColor); if(hbmPrev!=NULL) { /* error on select? */ hbm=icoi.hbmColor; icoi.hbmColor=CreateCompatibleBitmap(hdc,cx,cy); @@ -202,7 +202,7 @@ static INT_PTR ServiceCreateMergedFlagIcon(WPARAM wParam,LPARAM lParam) if(hrgn!=NULL) { SelectClipRgn(hdc,hrgn); DeleteObject(hrgn); - hbmPrev=SelectObject(hdc,icoi.hbmColor); + hbmPrev = (HBITMAP)SelectObject(hdc, icoi.hbmColor); if(hbmPrev!=NULL) { /* error on select? */ if(DrawIconEx(hdc,0,0,hUpperIcon,bm.bmWidth,bm.bmHeight,0,NULL,DI_NOMIRROR|DI_IMAGE)) if(SelectObject(hdc,icoi.hbmMask)!=NULL) /* error on select? */ diff --git a/plugins/CountryFlags/main.cpp b/plugins/CountryFlags/main.cpp index cb2f36b2e8..af6229b09c 100644 --- a/plugins/CountryFlags/main.cpp +++ b/plugins/CountryFlags/main.cpp @@ -43,13 +43,9 @@ static PLUGININFOEX pluginInfo={ }; static const MUUID interfaces[]={MIID_FLAGS,MIID_LAST}; -BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,void *pReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - UNREFERENCED_PARAMETER(pReserved); - if(fdwReason==DLL_PROCESS_ATTACH) - /* Do not call this function from a DLL that is linked to the static C run-time library (CRT). - * The static CRT requires DLL_THREAD_ATTACH and DLL_THREAD_DETATCH notifications to function properly. */ - DisableThreadLibraryCalls(hInst=hinstDLL); + hInst = hinstDLL; return TRUE; } @@ -82,21 +78,17 @@ static void InstallFile(const TCHAR *pszFileName,const TCHAR *pszDestSubDir) } } -#ifdef __cplusplus -extern "C" { -#endif - -__declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; } -__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) +extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) { return interfaces; } -__declspec(dllexport) int Load(PLUGINLINK *link) +extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) { pluginLink=link; mir_getLP(&pluginInfo); @@ -128,7 +120,7 @@ __declspec(dllexport) int Load(PLUGINLINK *link) return 0; } -__declspec(dllexport) int Unload(void) +extern "C" __declspec(dllexport) int Unload(void) { KillBufferedFunctions(); UninitExtraImg(); @@ -136,8 +128,4 @@ __declspec(dllexport) int Unload(void) UninitIcons(); UninitCountryListExt(); return 0; -} - -#ifdef __cplusplus -} -#endif +} \ No newline at end of file -- cgit v1.2.3