Browse Source

i18n

COM-121
Volker Birk 10 months ago
parent
commit
4deb7fa0d3
4 changed files with 19 additions and 2 deletions
  1. +16
    -0
      CMainWindow.cpp
  2. +1
    -2
      CMainWindow.h
  3. BIN
      pEpCOMServerAdapter.rc
  4. +2
    -0
      pEpCOMServerAdapter.vcxproj

+ 16
- 0
CMainWindow.cpp View File

@ -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<CMainWindow>()
{
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


+ 1
- 2
CMainWindow.h View File

@ -12,8 +12,7 @@ class CMainWindow :
bool _schedule_updates;
public:
CMainWindow() :
_schedule_updates(true), CWindowImpl<CMainWindow>() { }
CMainWindow();
DECLARE_WND_CLASS(_T("pEpCOMServerAdapterMainWndClass"))
BEGIN_MSG_MAP(CMainWindow)


BIN
pEpCOMServerAdapter.rc View File


+ 2
- 0
pEpCOMServerAdapter.vcxproj View File

@ -90,6 +90,8 @@ xcopy /y "..\Dependencies\zlib\zlib1.dll" "$(OutDir)"
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalOptions>
</AdditionalOptions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>


Loading…
Cancel
Save