From f8b0ff564fd434dfe5ae8d617ca12f70b3765dcf Mon Sep 17 00:00:00 2001 From: Frank Li Date: Sat, 16 May 2009 12:52:53 +0800 Subject: [PATCH 1/1] Enable GDI+ --- src/TortoiseProc/TortoiseProc.cpp | 6 +++++- src/TortoiseProc/TortoiseProc.h | 1 + src/TortoiseProc/stdafx.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TortoiseProc/TortoiseProc.cpp b/src/TortoiseProc/TortoiseProc.cpp index d19c3d6..9069748 100644 --- a/src/TortoiseProc/TortoiseProc.cpp +++ b/src/TortoiseProc/TortoiseProc.cpp @@ -128,7 +128,9 @@ BOOL CTortoiseProcApp::InitInstance() CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); CMFCButton::EnableWindowsTheming(); - + Gdiplus::GdiplusStartupInput gdiplusStartupInput; + Gdiplus::GdiplusStartup(&m_gdiplusToken,&gdiplusStartupInput,NULL); + if(!CheckMsysGitDir()) { if(CMessageBox::Show(NULL,_T("MSysGit(http://code.google.com/p/msysgit) have not installed Correctly\n\ @@ -616,6 +618,8 @@ void CTortoiseProcApp::EnableCrashHandler() int CTortoiseProcApp::ExitInstance() { + Gdiplus::GdiplusShutdown(m_gdiplusToken); + CWinAppEx::ExitInstance(); if (retSuccess) return 0; diff --git a/src/TortoiseProc/TortoiseProc.h b/src/TortoiseProc/TortoiseProc.h index d61b770..f6c2b7c 100644 --- a/src/TortoiseProc/TortoiseProc.h +++ b/src/TortoiseProc/TortoiseProc.h @@ -60,6 +60,7 @@ public: void CheckUpgrade(); void EnableCrashHandler(); + ULONG_PTR m_gdiplusToken; // Implementation private: diff --git a/src/TortoiseProc/stdafx.h b/src/TortoiseProc/stdafx.h index b4d57a2..0e86d2d 100644 --- a/src/TortoiseProc/stdafx.h +++ b/src/TortoiseProc/stdafx.h @@ -46,6 +46,7 @@ #include // MFC support for ribbons and control bars #include +#include #ifndef LVS_EX_DOUBLEBUFFER #define LVS_EX_DOUBLEBUFFER 0x00010000 -- 2.11.0