diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-12 20:33:29 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-12 20:33:29 +0000 |
commit | 0518395399244e9611c33cd708cfb373c4ff3f2f (patch) | |
tree | 08b6160baf5efee14e716efba9df764606338b36 /plugins/Scriver/src/richutil.cpp | |
parent | 7fcc33b6f02d4d36c1e45051200921dbd9ec4e9e (diff) |
clearing Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@3988 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/richutil.cpp')
-rw-r--r-- | plugins/Scriver/src/richutil.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/Scriver/src/richutil.cpp b/plugins/Scriver/src/richutil.cpp index 4a50df057b..cc7eb2b467 100644 --- a/plugins/Scriver/src/richutil.cpp +++ b/plugins/Scriver/src/richutil.cpp @@ -69,10 +69,11 @@ void RichUtil_Load(void) sListInt.increment = 10;
sListInt.sortFunc = RichUtil_CmpVal;
- mTheme = IsWinVerXPPlus() ? GetModuleHandleA("uxtheme") : 0;
-
InitializeCriticalSection(&csRich);
- if (!mTheme) return;
+
+ mTheme = IsWinVerXPPlus() ? GetModuleHandleA("uxtheme") : 0;
+ if (!mTheme)
+ return;
MyOpenThemeData = (HANDLE (WINAPI *)(HWND, LPCWSTR))GetProcAddress(mTheme, "OpenThemeData");
MyCloseThemeData = (HRESULT (WINAPI *)(HANDLE))GetProcAddress(mTheme, "CloseThemeData");
@@ -84,25 +85,16 @@ void RichUtil_Load(void) MyIsThemeBackgroundPartiallyTransparent = (BOOL (WINAPI *)(HANDLE, int, int))GetProcAddress(mTheme, "IsThemeBackgroundPartiallyTransparent");
MyDrawThemeText = (HRESULT (WINAPI *)(HANDLE, HDC, int, int, LPCWSTR, int, DWORD, DWORD, const RECT *))GetProcAddress(mTheme, "DrawThemeText");
MyEnableThemeDialogTexture = (HRESULT (WINAPI *)(HWND, DWORD))GetProcAddress(mTheme, "EnableThemeDialogTexture");
- if (!MyOpenThemeData ||
- !MyCloseThemeData ||
- !MyIsThemeActive ||
- !MyDrawThemeBackground ||
- !MyGetThemeBackgroundContentRect ||
- !MyDrawThemeParentBackground ||
- !MyIsThemeBackgroundPartiallyTransparent)
- {
- FreeLibrary(mTheme);
+ if (!MyOpenThemeData || !MyCloseThemeData || !MyIsThemeActive || !MyDrawThemeBackground ||
+ !MyGetThemeBackgroundContentRect || !MyDrawThemeParentBackground || !MyIsThemeBackgroundPartiallyTransparent)
mTheme = NULL;
- }
}
void RichUtil_Unload(void)
{
List_Destroy(&sListInt);
DeleteCriticalSection(&csRich);
- if (mTheme)
- FreeLibrary(mTheme);
+ mTheme = NULL;
}
int RichUtil_SubClass(HWND hwndEdit)
|