From 2f56dcad8e7dccc129765a24a96861f8ce5ffeea Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 Jun 2012 16:49:09 +0000 Subject: Clist: plusified git-svn-id: http://svn.miranda-ng.org/main/trunk@571 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist/clcpaint.cpp | 4 ++-- plugins/Clist/clist_10.vcxproj | 23 +++++++++++------------ plugins/Clist/clist_10.vcxproj.filters | 17 +++++++---------- plugins/Clist/commonheaders.cpp | 1 - plugins/Clist/commonheaders.h | 5 ++++- plugins/Clist/init.cpp | 14 ++++++-------- 6 files changed, 30 insertions(+), 34 deletions(-) delete mode 100644 plugins/Clist/commonheaders.cpp diff --git a/plugins/Clist/clcpaint.cpp b/plugins/Clist/clcpaint.cpp index 1ddf6bebc1..dfa4147244 100644 --- a/plugins/Clist/clcpaint.cpp +++ b/plugins/Clist/clcpaint.cpp @@ -180,10 +180,10 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) y = -dat->yScroll; hdcMem = CreateCompatibleDC(hdc); hBmpOsb = CreateBitmap(clRect.right, clRect.bottom, 1, GetDeviceCaps(hdc, BITSPIXEL), NULL); - hOldBitmap = SelectObject(hdcMem, hBmpOsb); + hOldBitmap = (HBITMAP)SelectObject(hdcMem, hBmpOsb); { TEXTMETRIC tm; - hOldFont = SelectObject(hdcMem, dat->fontInfo[FONTID_GROUPS].hFont); + hOldFont = (HFONT)SelectObject(hdcMem, dat->fontInfo[FONTID_GROUPS].hFont); GetTextMetrics(hdcMem, &tm); groupCountsFontTopShift = tm.tmAscent; SelectObject(hdcMem, dat->fontInfo[FONTID_GROUPCOUNTS].hFont); diff --git a/plugins/Clist/clist_10.vcxproj b/plugins/Clist/clist_10.vcxproj index da5f39ec67..01bc0a0d6a 100644 --- a/plugins/Clist/clist_10.vcxproj +++ b/plugins/Clist/clist_10.vcxproj @@ -73,7 +73,7 @@ Disabled ..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -106,7 +106,7 @@ Disabled ..\..\include;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions) false EnableFastChecks MultiThreadedDebugDLL @@ -140,7 +140,7 @@ OnlyExplicitInline Size ..\..\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions) true false true @@ -176,7 +176,7 @@ OnlyExplicitInline Size ..\..\include;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;UNICODE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;CLIST_EXPORTS;%(PreprocessorDefinitions) true false true @@ -207,16 +207,15 @@ - - - - - - - + + + + + + + Create - diff --git a/plugins/Clist/clist_10.vcxproj.filters b/plugins/Clist/clist_10.vcxproj.filters index cdb7418639..e69d846fc1 100644 --- a/plugins/Clist/clist_10.vcxproj.filters +++ b/plugins/Clist/clist_10.vcxproj.filters @@ -15,28 +15,25 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - - Source Files - - + Source Files diff --git a/plugins/Clist/commonheaders.cpp b/plugins/Clist/commonheaders.cpp deleted file mode 100644 index 14f99f7d71..0000000000 --- a/plugins/Clist/commonheaders.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "commonheaders.h" diff --git a/plugins/Clist/commonheaders.h b/plugins/Clist/commonheaders.h index c9a676d3c6..7382317420 100644 --- a/plugins/Clist/commonheaders.h +++ b/plugins/Clist/commonheaders.h @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include "resource.h" + #include #include #include @@ -58,8 +58,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include + #include "clc.h" #include "version.h" +#include "resource.h" // shared vars extern HINSTANCE g_hInst; diff --git a/plugins/Clist/init.cpp b/plugins/Clist/init.cpp index 319e3a6f1f..06f935f367 100644 --- a/plugins/Clist/init.cpp +++ b/plugins/Clist/init.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "commonheaders.h" -#include HINSTANCE g_hInst = 0; PLUGINLINK *pluginLink; @@ -53,7 +52,6 @@ int CListModernOptInit(WPARAM wParam, LPARAM lParam); BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved) { g_hInst = hInstDLL; - DisableThreadLibraryCalls(g_hInst); return TRUE; } @@ -74,7 +72,7 @@ PLUGININFOEX pluginInfo = { {0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe3 }} //{240A91DC-9464-457a-9787-FF1EA88E77E3} }; -__declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; } @@ -83,7 +81,7 @@ __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) // returns plugin's interfaces information static const MUUID interfaces[] = {MIID_CLIST, MIID_LAST}; -__declspec(dllexport) const MUUID * MirandaPluginInterfaces(void) +extern "C" __declspec(dllexport) const MUUID * MirandaPluginInterfaces(void) { return interfaces; } @@ -139,7 +137,7 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// // main clist initialization routine -int __declspec(dllexport) CListInitialise(PLUGINLINK * link) +extern "C" __declspec(dllexport) int CListInitialise(PLUGINLINK * link) { pluginLink = link; #ifdef _DEBUG @@ -177,7 +175,7 @@ LBL_Error: ///////////////////////////////////////////////////////////////////////////////////////// // a plugin loader aware of CList exports will never call this. -int __declspec(dllexport) Load(PLUGINLINK * link) +extern "C" __declspec(dllexport) int Load(PLUGINLINK * link) { return 1; } @@ -185,7 +183,7 @@ int __declspec(dllexport) Load(PLUGINLINK * link) ///////////////////////////////////////////////////////////////////////////////////////// // a plugin unloader -int __declspec(dllexport) Unload(void) +extern "C" __declspec(dllexport) int Unload(void) { return 0; -} +} \ No newline at end of file -- cgit v1.2.3