Skip to content

Commit

Permalink
Fix RegisterClassEx failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancorvussolis committed May 6, 2016
1 parent 9f5ff91 commit 9365d57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 12 additions & 0 deletions imcrvtip/DllMain.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@

#include "imcrvtip.h"
#include "CandidateWindow.h"
#include "InputModeWindow.h"

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
g_hInst = hinstDLL;
if(!CCandidateWindow::_InitClass())
{
return FALSE;
}
if(!CInputModeWindow::_InitClass())
{
return FALSE;
}
break;

case DLL_PROCESS_DETACH:
CCandidateWindow::_UninitClass();
CInputModeWindow::_UninitClass();
break;

default:
Expand Down
8 changes: 0 additions & 8 deletions imcrvtip/TextService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#include "imcrvtip.h"
#include "TextService.h"
#include "CandidateList.h"
#include "CandidateWindow.h"
#include "InputModeWindow.h"

CTextService::CTextService()
{
Expand Down Expand Up @@ -153,9 +151,6 @@ STDAPI CTextService::ActivateEx(ITfThreadMgr *ptim, TfClientId tid, DWORD dwFlag
_pThreadMgr->AddRef();
_ClientId = tid;

CCandidateWindow::_InitClass();
CInputModeWindow::_InitClass();

if (!_IsKeyboardOpen())
{
_KeyboardSetDefaultMode();
Expand Down Expand Up @@ -244,9 +239,6 @@ STDAPI CTextService::Deactivate()

_UninitFont();

CCandidateWindow::_UninitClass();
CInputModeWindow::_UninitClass();

SafeRelease(&_pThreadMgr);

_ClientId = TF_CLIENTID_NULL;
Expand Down

0 comments on commit 9365d57

Please sign in to comment.