diff --git a/CMainWindow.cpp b/CMainWindow.cpp index a20aded..3bc0288 100644 --- a/CMainWindow.cpp +++ b/CMainWindow.cpp @@ -5,6 +5,22 @@ static const GUID nidGUID = { 0xa4dbdbe1, 0x4051, 0x4d89, { 0xb1, 0x17, 0x62, 0x82, 0x18, 0x5a, 0x61, 0x5c } }; +CMainWindow::CMainWindow() : + _schedule_updates(true), CWindowImpl() +{ + ULONG ulNumLanguages = 0; + PZZWSTR pwszLanguagesBuffer = NULL; + ULONG pcchLanguagesBuffer = 0; + BOOL bResult = GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &ulNumLanguages, NULL, &pcchLanguagesBuffer); + assert(bResult); + pwszLanguagesBuffer = new WCHAR[pcchLanguagesBuffer]; + bResult = GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &ulNumLanguages, pwszLanguagesBuffer, &pcchLanguagesBuffer); + assert(bResult); + bResult = SetProcessPreferredUILanguages(MUI_LANGUAGE_NAME, pwszLanguagesBuffer, &ulNumLanguages); + assert(bResult); + delete[] pwszLanguagesBuffer; +} + LRESULT CMainWindow::OnCreate(UINT, WPARAM, LPARAM, BOOL&) { // remove leftoff before creating a new one diff --git a/CMainWindow.h b/CMainWindow.h index 9113c0f..630061c 100644 --- a/CMainWindow.h +++ b/CMainWindow.h @@ -12,8 +12,7 @@ class CMainWindow : bool _schedule_updates; public: - CMainWindow() : - _schedule_updates(true), CWindowImpl() { } + CMainWindow(); DECLARE_WND_CLASS(_T("pEpCOMServerAdapterMainWndClass")) BEGIN_MSG_MAP(CMainWindow) diff --git a/pEpCOMServerAdapter.rc b/pEpCOMServerAdapter.rc index d2b11e5..379df39 100644 Binary files a/pEpCOMServerAdapter.rc and b/pEpCOMServerAdapter.rc differ diff --git a/pEpCOMServerAdapter.vcxproj b/pEpCOMServerAdapter.vcxproj index 606363e..56b6d81 100644 --- a/pEpCOMServerAdapter.vcxproj +++ b/pEpCOMServerAdapter.vcxproj @@ -90,6 +90,8 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)" 0x0409 $(IntDir);%(AdditionalIncludeDirectories) _DEBUG;%(PreprocessorDefinitions) + + Windows