diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-03 16:49:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-03 16:49:50 +0300 |
commit | 8beac85f6a7b0538622b67e9d2739155792777a2 (patch) | |
tree | 7b452c8344ed72b3c6f700f1e89dff93b7450daf /plugins/mTextControl/src/main.cpp | |
parent | 58a9d3dbd775650dd1a8ac51ec78748184b4a657 (diff) |
mTextControl: code cleaning
Diffstat (limited to 'plugins/mTextControl/src/main.cpp')
-rw-r--r-- | plugins/mTextControl/src/main.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp index 512b86a543..d1ded43909 100644 --- a/plugins/mTextControl/src/main.cpp +++ b/plugins/mTextControl/src/main.cpp @@ -25,8 +25,7 @@ CMPlugin g_plugin; HMODULE hMsfteditDll = nullptr;
-typedef HRESULT(WINAPI *pfnMyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHost, IUnknown **ppUnk);
-pfnMyCreateTextServices MyCreateTextServices = nullptr;
+PCreateTextServices MyCreateTextServices = nullptr;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -50,14 +49,15 @@ CMPlugin::CMPlugin() : /////////////////////////////////////////////////////////////////////////////////////////
+void MTextControl_RegisterClass();
+
int CMPlugin::Load()
{
MyCreateTextServices = nullptr;
hMsfteditDll = LoadLibrary(L"msftedit.dll");
if (hMsfteditDll)
- MyCreateTextServices = (pfnMyCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices");
+ MyCreateTextServices = (PCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices");
- LoadRichEdit();
LoadTextUsers();
LoadServices();
@@ -67,10 +67,11 @@ int CMPlugin::Load() /////////////////////////////////////////////////////////////////////////////////////////
+void UnloadEmfCache();
+
int CMPlugin::Unload()
{
UnloadTextUsers();
- UnloadRichEdit();
UnloadEmfCache();
FreeLibrary(hMsfteditDll);
return 0;
|