+ enh: MultiLingual Support part II

This commit is contained in:
Rainer Kottenhoff 2018-05-14 01:23:40 +02:00
parent f847b89ae2
commit c31e368682
6 changed files with 260 additions and 51 deletions

View File

@ -4,23 +4,24 @@ setlocal
rem for DLL generation: Project-Config: Linker: Manifest: Generate: NO (/MANIFEST:NO)
set MUIRCT_EXE=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86\muirct.exe
set COMPDIR=.\Bin\Debug_x64_v141\lng
set COMPDIR=.\Bin\Debug_x64_v141
mkdir "%COMPDIR%\en-US"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x0409 -g 0x0409 "%COMPDIR%\np3_en_us.dll" "%COMPDIR%\np3_lng.dll" "%COMPDIR%\en-US\np3_lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3_lng.dll" -e "%COMPDIR%\en-US\np3_lng.dll.mui"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x0409 -g 0x0409 "%COMPDIR%\lng\np3_en_us.dll" "%COMPDIR%\np3lng.dll" "%COMPDIR%\en-US\np3lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3lng.dll" -e "%COMPDIR%\en-US\np3lng.dll.mui"
mkdir "%COMPDIR%\de-DE"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x0407 -g 0x0409 "%COMPDIR%\np3_de_de.dll" "%COMPDIR%\np3_lng_de_discard.dll" "%COMPDIR%\de-DE\np3_lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3_lng.dll" -e "%COMPDIR%\de-DE\np3_lng.dll.mui"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x0407 -g 0x0409 "%COMPDIR%\lng\np3_de_de.dll" "%COMPDIR%\lng\np3lng_de_discard.dll" "%COMPDIR%\de-DE\np3lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3lng.dll" -e "%COMPDIR%\de-DE\np3lng.dll.mui"
mkdir "%COMPDIR%\es-ES"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x0C0A -g 0x0409 "%COMPDIR%\np3_es_es.dll" "%COMPDIR%\np3_lng_es_discard.dll" "%COMPDIR%\es-ES\np3_lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3_lng.dll" -e "%COMPDIR%\es-ES\np3_lng.dll.mui"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x0C0A -g 0x0409 "%COMPDIR%\lng\np3_es_es.dll" "%COMPDIR%\lng\np3lng_es_discard.dll" "%COMPDIR%\es-ES\np3lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3lng.dll" -e "%COMPDIR%\es-ES\np3lng.dll.mui"
mkdir "%COMPDIR%\fr-FR"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x040C -g 0x0409 "%COMPDIR%\np3_fr_fr.dll" "%COMPDIR%\np3_lng_fr_discard.dll" "%COMPDIR%\fr-FR\np3_lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3_lng.dll" -e "%COMPDIR%\fr-FR\np3_lng.dll.mui"
"%MUIRCT_EXE%" -q DoReverseMuiLoc.rcconfig -v 2 -x 0x040C -g 0x0409 "%COMPDIR%\lng\np3_fr_fr.dll" "%COMPDIR%\lng\np3lng_fr_discard.dll" "%COMPDIR%\fr-FR\np3lng.dll.mui"
"%MUIRCT_EXE%" -c "%COMPDIR%\np3lng.dll" -e "%COMPDIR%\fr-FR\np3lng.dll.mui"
endlocal
pause

View File

@ -41,6 +41,7 @@
//=============================================================================
extern HINSTANCE g_hInstance;
extern HMODULE g_hLngResContainer;
//=============================================================================
//
@ -73,6 +74,42 @@ WCHAR* _StrCutIW(WCHAR* s,const WCHAR* pattern)
return s;
}
//=============================================================================
//=============================================================================
//
// Find next token in string
//
CHAR* _StrNextTokA(CHAR* strg, const CHAR* tokens)
{
CHAR* n = NULL;
const CHAR* t = tokens;
while (t && *t) {
CHAR* const f = StrChrA(strg, *t);
if (!n || (f && (f < n))) {
n = f;
}
++t;
}
return n;
}
WCHAR* _StrNextTokW(WCHAR* strg, const WCHAR* tokens)
{
WCHAR* n = NULL;
const WCHAR* t = tokens;
while (t && *t) {
WCHAR* const f = StrChrW(strg, *t);
if (!n || (f && (f < n))) {
n = f;
}
++t;
}
return n;
}
//=============================================================================
//
@ -532,10 +569,15 @@ bool SetWindowTitle(HWND hwnd,UINT uIDAppName,bool bIsElevated,UINT uIDUntitled,
if (bFreezeAppTitle)
return false;
//if (!GetString(uIDAppName,szAppName,COUNTOF(szAppName)) ||
// !GetString(uIDUntitled,szUntitled,COUNTOF(szUntitled)))
// return false;
if (!GetString(uIDAppName,szAppName,COUNTOF(szAppName)) ||
!GetString(uIDUntitled,szUntitled,COUNTOF(szUntitled)))
!GetLngString(uIDUntitled,szUntitled,COUNTOF(szUntitled)))
return false;
if (bIsElevated) {
FormatString(szElevatedAppName,COUNTOF(szElevatedAppName),IDS_APPTITLE_ELEVATED,szAppName);
StringCchCopyN(szAppName,COUNTOF(szAppName),szElevatedAppName,COUNTOF(szElevatedAppName));

View File

@ -187,6 +187,7 @@ bool IsCmdEnabled(HWND, UINT);
if (GetFocus() == hctrl) { SendMessage((hdlg), WM_NEXTDLGCTL, 0, false); } }; EnableWindow(hctrl, (b)); }
#define GetString(id,pb,cb) LoadString(g_hInstance,id,pb,cb)
#define GetLngString(id,pb,cb) LoadString((g_hLngResContainer ? g_hLngResContainer : g_hInstance),(id),(pb),(cb))
#define StrEnd(pStart) (pStart + lstrlen(pStart))
@ -308,7 +309,7 @@ bool GetDoAnimateMinimize(VOID);
VOID MinimizeWndToTray(HWND hWnd);
VOID RestoreWndFromTray(HWND hWnd);
//==== strCut methods ===================
//==== StrCut methods ===================
CHAR* _StrCutIA(CHAR*,const CHAR*);
WCHAR* _StrCutIW(WCHAR*,const WCHAR*);
@ -318,6 +319,17 @@ WCHAR* _StrCutIW(WCHAR*,const WCHAR*);
#define StrCutI _StrCutIA
#endif
//==== StrNextTok methods ===================
CHAR* _StrNextTokA(CHAR*, const CHAR*);
WCHAR* _StrNextTokW(WCHAR*, const WCHAR*);
#if defined(UNICODE) || defined(_UNICODE)
#define StrNextTok _StrNextTokW
#else
#define StrNextTok _StrNextTokA
#endif
//==== StrSafe lstrlen() =======================================================
__forceinline DocPos StringCchLenA(LPCSTR s,size_t m) { size_t len; return (DocPos)(!s ? 0 : (SUCCEEDED(StringCchLengthA(s, m, &len)) ? len : m)); }
__forceinline DocPos StringCchLenW(LPCWSTR s,size_t m) { size_t len; return (DocPos)(!s ? 0 : (SUCCEEDED(StringCchLengthW(s, m, &len)) ? len : m)); }

View File

@ -35,6 +35,7 @@
#include <string.h>
//#include <pathcch.h>
#include <time.h>
#include <muiload.h>
#include "scintilla.h"
#include "scilexer.h"
@ -130,6 +131,9 @@ bool g_bPreserveCaretPos;
bool g_bSaveFindReplace;
bool g_bFindReplCopySelOrClip = true;
WCHAR g_tchUserDefinedLanguages[LARGE_BUFFER];
HMODULE g_hLngResContainer = NULL;
WCHAR g_tchFileDlgFilters[XXXL_BUFFER] = { L'\0' };
WCHAR g_tchLastSaveCopyDir[MAX_PATH] = { L'\0' };
@ -542,6 +546,7 @@ static int g_flagBufferFile = 0;
// decalarations
static void __fastcall _UpdateStatusbarDelayed(bool bForceRedraw);
static void __fastcall _UpdateToolbarDelayed();
static HMODULE __fastcall _LoadLanguageResources();
//==============================================================================
//
@ -564,6 +569,47 @@ static void __fastcall _SetDocumentModified(bool bModified)
}
}
//==============================================================================
static bool __fastcall _LngStrToMultiLngStr(WCHAR* pLngStr, WCHAR* pLngMultiStr, size_t lngMultiStrSize)
{
bool rtnVal = true;
size_t strLen = (size_t)lstrlenW(pLngStr);
if ((strLen > 0) && pLngMultiStr && (lngMultiStrSize > 0))
{
WCHAR* lngMultiStrPtr = pLngMultiStr;
WCHAR* last = pLngStr + (pLngStr[0] == 0xFEFF ? 1 : 0); // if read from unicode (UTF-16 LE) file
while (last && rtnVal)
{
// make sure you validate the user input
WCHAR* next = StrNextTok(last, L",; :");
if (next) { *next = L'\0'; }
strLen = (size_t)StringCchLenW(last, LOCALE_NAME_MAX_LENGTH);
if ((strLen > 0) && IsValidLocaleName(last))
{
lngMultiStrPtr[0] = L'\0';
rtnVal &= SUCCEEDED(StringCchCatW(lngMultiStrPtr, (lngMultiStrSize - (lngMultiStrPtr - pLngMultiStr)), last));
lngMultiStrPtr += strLen + 1;
}
last = (next ? next + 1 : next);
}
if (rtnVal && (lngMultiStrSize - (lngMultiStrPtr - pLngMultiStr))) // make sure there is a double null term for the multi-string
{
lngMultiStrPtr[0] = L'\0';
}
else // fail and guard anyone whom might use the multi-string
{
lngMultiStrPtr[0] = L'\0';
lngMultiStrPtr[1] = L'\0';
}
}
return rtnVal;
}
//=============================================================================
//
@ -573,6 +619,7 @@ static void __fastcall _SetDocumentModified(bool bModified)
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nCmdShow)
{
UNUSED(hPrevInst);
MSG msg;
HWND hwnd;
@ -599,8 +646,8 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
// check if running at least on Windows XP
if (!IsXP()) {
// check if running at least on Windows 7
if (!IsWin7()) {
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER|
@ -614,7 +661,7 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
NULL);
MessageBox(NULL,(LPCWSTR)lpMsgBuf,L"Notepad3",MB_OK|MB_ICONEXCLAMATION);
LocalFree(lpMsgBuf);
return(0);
return 1; // exit
}
// Check if running with elevated privileges
@ -630,6 +677,9 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
CreateIniFile();
LoadFlags();
// Load Settings
LoadSettings();
// set AppUserModelID
PrivateSetCurrentProcessExplicitAppUserModelID(g_wchAppUserModelID);
@ -657,9 +707,11 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
if (ActivatePrevInst())
return(0);
// MultiLingual
g_hLngResContainer = _LoadLanguageResources();
// Init OLE and Common Controls
OleInitialize(NULL);
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_WIN95_CLASSES|ICC_COOL_CLASSES|ICC_BAR_CLASSES|ICC_USEREX_CLASSES;
InitCommonControlsEx(&icex);
@ -674,9 +726,6 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
Scintilla_RegisterClasses(hInstance);
// Load Settings
LoadSettings();
if (!InitApplication(hInstance))
return false;
@ -737,12 +786,11 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
Scintilla_ReleaseResources();
UnregisterClass(wchWndClass,hInstance);
if (hModUxTheme)
FreeLibrary(hModUxTheme);
if (hModUxTheme) { FreeLibrary(hModUxTheme); }
OleUninitialize();
UNUSED(hPrevInst);
FreeMUILibrary(g_hLngResContainer);
return(int)(msg.wParam);
}
@ -774,6 +822,107 @@ bool InitApplication(HINSTANCE hInstance)
}
//=============================================================================
//
// _LoadLanguageResources
//
//
static HMODULE __fastcall _LoadLanguageResources()
{
HMODULE hLangResourceContainer = NULL;
WCHAR tchUserLangMultiStrg[LARGE_BUFFER];
if (!_LngStrToMultiLngStr(g_tchUserDefinedLanguages, tchUserLangMultiStrg, LARGE_BUFFER))
{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
ERROR_MUI_INVALID_LOCALE_NAME,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPWSTR)&lpMsgBuf,
0,
NULL);
MessageBox(NULL, (LPCWSTR)lpMsgBuf, L"Notepad3", MB_OK | MB_ICONEXCLAMATION);
LocalFree(lpMsgBuf);
return NULL; // exit
}
// set the appropriate fallback list
DWORD langCount = 0;
// using SetProcessPreferredUILanguages is recomended for new applications (esp. multi-threaded applications)
if (!SetProcessPreferredUILanguages(MUI_LANGUAGE_NAME, tchUserLangMultiStrg, &langCount) || (langCount == 0))
{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPWSTR)&lpMsgBuf,
0,
NULL);
MessageBox(NULL, (LPCWSTR)lpMsgBuf, L"Notepad3", MB_OK | MB_ICONEXCLAMATION);
LocalFree(lpMsgBuf);
return NULL; // exit
}
// NOTES:
// an application developer that makes the assumption the fallback list provided by the
// system / OS is entirely sufficient may or may not be making a good assumption based mostly on:
// A. your choice of languages installed with your application
// B. the languages on the OS at application install time
// C. the OS users propensity to install/uninstall language packs
// D. the OS users propensity to change laguage settings
// obtains access to the proper resource container
// for standard Win32 resource loading this is normally a PE module - use LoadLibraryEx
hLangResourceContainer = LoadMUILibraryW(L"np3lng.dll", MUI_LANGUAGE_NAME, GetUserDefaultUILanguage());
//hLangResourceContainer = LoadMUILibraryW(L"np3lng.dll", MUI_LANGUAGE_NAME, 0x0407);
if (!hLangResourceContainer)
{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
ERROR_MUI_FILE_NOT_LOADED,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPWSTR)&lpMsgBuf,
0,
NULL);
MessageBox(NULL, (LPCWSTR)lpMsgBuf, L"Notepad3", MB_OK | MB_ICONEXCLAMATION);
LocalFree(lpMsgBuf);
return NULL; // exit
}
//// 3. Application parses the resource container to find the appropriate item
//WCHAR szUntitled[SMALL_BUFFER];
//if (LoadStringW(hLangResourceContainer, IDS_MUI_UNTITLED, szUntitled, SMALL_BUFFER) == 0)
//{
// MsgBox(MBWARN, IDS_PRINT_EMPTY);
// FreeMUILibrary(hLangResourceContainer);
// return NULL; // exit
//}
//// 4. Application presents the discovered resource to the user via UI
//WCHAR displayBuffer[LARGE_BUFFER];
//StringCchPrintfW(displayBuffer, LARGE_BUFFER, L"%s MUI", szUntitled);
//MessageBoxW(NULL, displayBuffer, L"HelloMUI", MB_OK | MB_ICONINFORMATION);
return hLangResourceContainer;
}
//=============================================================================
//
@ -1187,7 +1336,8 @@ HWND InitInstance(HINSTANCE hInstance,LPSTR pszCmdLine,int nCmdShow)
pszTitle = shfi.szDisplayName;
}
else {
GetString(IDS_UNTITLED, tchUntitled, COUNTOF(tchUntitled));
//GetString(IDS_UNTITLED, tchUntitled, COUNTOF(tchUntitled));
GetLngString(IDS_MUI_UNTITLED, tchUntitled, COUNTOF(tchUntitled));
pszTitle = tchUntitled;
}
@ -2964,7 +3114,8 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
pszTitle = shfi.szDisplayName;
}
else {
GetString(IDS_UNTITLED,tchUntitled,COUNTOF(tchUntitled));
//GetString(IDS_UNTITLED,tchUntitled,COUNTOF(tchUntitled));
GetLngString(IDS_MUI_UNTITLED, tchUntitled, COUNTOF(tchUntitled));
pszTitle = tchUntitled;
}
@ -3870,7 +4021,8 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
pszInsert = g_wchCurFile;
}
else {
GetString(IDS_UNTITLED,tchUntitled,COUNTOF(tchUntitled));
//GetString(IDS_UNTITLED,tchUntitled,COUNTOF(tchUntitled));
GetLngString(IDS_MUI_UNTITLED, tchUntitled, COUNTOF(tchUntitled));
pszInsert = tchUntitled;
}
@ -5339,7 +5491,8 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
if (StringCchLenW(g_wchCurFile,COUNTOF(g_wchCurFile)))
pszCopy = g_wchCurFile;
else {
GetString(IDS_UNTITLED,tchUntitled,COUNTOF(tchUntitled));
//GetString(IDS_UNTITLED,tchUntitled,COUNTOF(tchUntitled));
GetLngString(IDS_MUI_UNTITLED, tchUntitled, COUNTOF(tchUntitled));
pszCopy = tchUntitled;
}
SetClipboardTextW(hwnd, pszCopy);
@ -6464,6 +6617,9 @@ void LoadSettings()
LoadIniSection(L"Settings2",pIniSection,cchIniSection);
// --------------------------------------------------------------------------
IniSectionGetString(pIniSection, L"UserDefinedLanguages", L"de-DE", // L"fr-FR es-ES de-DE en-US",
g_tchUserDefinedLanguages, COUNTOF(g_tchUserDefinedLanguages));
g_bStickyWinPos = IniSectionGetBool(pIniSection,L"StickyWindowPosition",false);
IniSectionGetString(pIniSection,L"DefaultExtension",L"txt", g_tchDefaultExtension,COUNTOF(g_tchDefaultExtension));
@ -6472,8 +6628,7 @@ void LoadSettings()
IniSectionGetString(pIniSection,L"DefaultDirectory",L"", g_tchDefaultDir,COUNTOF(g_tchDefaultDir));
ZeroMemory(g_tchFileDlgFilters,sizeof(WCHAR)*COUNTOF(g_tchFileDlgFilters));
IniSectionGetString(pIniSection,L"FileDlgFilters",L"",
g_tchFileDlgFilters,COUNTOF(g_tchFileDlgFilters)-2);
IniSectionGetString(pIniSection,L"FileDlgFilters",L"", g_tchFileDlgFilters,COUNTOF(g_tchFileDlgFilters)-2);
dwFileCheckInverval = IniSectionGetInt(pIniSection,L"FileCheckInverval",2000);
dwAutoReloadTimeout = IniSectionGetInt(pIniSection,L"AutoReloadTimeout",2000);
@ -7555,10 +7710,15 @@ void UpdateToolbar()
static void __fastcall _UpdateToolbarDelayed()
{
SetWindowTitle(g_hwndMain, uidsAppTitle, flagIsElevated, IDS_UNTITLED, g_wchCurFile,
//SetWindowTitle(g_hwndMain, uidsAppTitle, flagIsElevated, IDS_UNTITLED, g_wchCurFile,
// iPathNameFormat, IsDocumentModified || Encoding_HasChanged(CPI_GET),
// IDS_READONLY, g_bFileReadOnly, szTitleExcerpt);
SetWindowTitle(g_hwndMain, uidsAppTitle, flagIsElevated, IDS_MUI_UNTITLED, g_wchCurFile,
iPathNameFormat, IsDocumentModified || Encoding_HasChanged(CPI_GET),
IDS_READONLY, g_bFileReadOnly, szTitleExcerpt);
if (!bShowToolbar) { return; }
EnableTool(IDT_FILE_ADDTOFAV, StringCchLenW(g_wchCurFile, COUNTOF(g_wchCurFile)));
@ -8769,11 +8929,13 @@ bool FileSave(bool bSaveAlways,bool bAsk,bool bSaveAs,bool bSaveCopy)
{
// File or "Untitled" ...
WCHAR tch[MAX_PATH] = { L'\0' };
if (StringCchLenW(g_wchCurFile,COUNTOF(g_wchCurFile)))
StringCchCopy(tch,COUNTOF(tch),g_wchCurFile);
else
GetString(IDS_UNTITLED,tch,COUNTOF(tch));
if (StringCchLenW(g_wchCurFile, COUNTOF(g_wchCurFile))) {
StringCchCopy(tch, COUNTOF(tch), g_wchCurFile);
}
else {
//GetString(IDS_UNTITLED, tch, COUNTOF(tch));
GetLngString(IDS_MUI_UNTITLED, tch, COUNTOF(tch));
}
switch (MsgBox(MBYESNOCANCEL,IDS_ASK_SAVE,tch)) {
case IDCANCEL:
return false;
@ -9522,9 +9684,10 @@ void SetNotifyIconTitle(HWND hwnd)
&shfi,sizeof(SHFILEINFO),SHGFI_DISPLAYNAME | SHGFI_USEFILEATTRIBUTES);
PathCompactPathEx(tchTitle,shfi.szDisplayName,COUNTOF(tchTitle)-4,0);
}
else
GetString(IDS_UNTITLED,tchTitle,COUNTOF(tchTitle)-4);
else {
//GetString(IDS_UNTITLED, tchTitle, COUNTOF(tchTitle) - 4);
GetLngString(IDS_MUI_UNTITLED, tchTitle, COUNTOF(tchTitle) - 4);
}
if (IsDocumentModified || Encoding_HasChanged(CPI_GET))
StringCchCopy(nid.szTip,COUNTOF(nid.szTip),L"* ");
else

View File

@ -118,7 +118,7 @@
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>Debug</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
@ -173,7 +173,7 @@
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>Debug</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
@ -227,7 +227,7 @@
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>No</GenerateDebugInformation>
<MergeSections>.rdata=.text</MergeSections>
<OptimizeReferences>true</OptimizeReferences>
@ -283,7 +283,7 @@
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>msimg32.lib;comctl32.lib;imm32.lib;shlwapi.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>No</GenerateDebugInformation>
<MergeSections>.rdata=.text</MergeSections>
<OptimizeReferences>true</OptimizeReferences>

View File

@ -524,14 +524,5 @@
#define IDM_EDIT_INSERT_GUID 60001
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 601
#define _APS_NEXT_COMMAND_VALUE 701
#define _APS_NEXT_CONTROL_VALUE 801
#define _APS_NEXT_SYMED_VALUE 901
#endif
#endif
#include "../language/np3_en_us/resource.h"