Author: hbelusca
Date: Sat Mar 14 20:00:39 2015
New Revision: 66712
URL:
http://svn.reactos.org/svn/reactos?rev=66712&view=rev
Log:
[NOTEPAD]
- Remove unneeded ChangeLog file (we have SVN)
- Partial wine resync of notepad (part 1/x): it's just to bring back some of their
fixes and improvements. CORE-9371
Removed:
trunk/reactos/base/applications/notepad/ChangeLog
Modified:
trunk/reactos/base/applications/notepad/dialog.c
trunk/reactos/base/applications/notepad/dialog.h
trunk/reactos/base/applications/notepad/lang/bg-BG.rc
trunk/reactos/base/applications/notepad/lang/cs-CZ.rc
trunk/reactos/base/applications/notepad/lang/da-DK.rc
trunk/reactos/base/applications/notepad/lang/de-DE.rc
trunk/reactos/base/applications/notepad/lang/el-GR.rc
trunk/reactos/base/applications/notepad/lang/en-US.rc
trunk/reactos/base/applications/notepad/lang/es-ES.rc
trunk/reactos/base/applications/notepad/lang/eu-ES.rc
trunk/reactos/base/applications/notepad/lang/fi-FI.rc
trunk/reactos/base/applications/notepad/lang/fr-FR.rc
trunk/reactos/base/applications/notepad/lang/he-IL.rc
trunk/reactos/base/applications/notepad/lang/hu-HU.rc
trunk/reactos/base/applications/notepad/lang/hy-AM.rc
trunk/reactos/base/applications/notepad/lang/id-ID.rc
trunk/reactos/base/applications/notepad/lang/it-IT.rc
trunk/reactos/base/applications/notepad/lang/ja-JP.rc
trunk/reactos/base/applications/notepad/lang/lt-LT.rc
trunk/reactos/base/applications/notepad/lang/nl-NL.rc
trunk/reactos/base/applications/notepad/lang/no-NO.rc
trunk/reactos/base/applications/notepad/lang/pl-PL.rc
trunk/reactos/base/applications/notepad/lang/pt-BR.rc
trunk/reactos/base/applications/notepad/lang/pt-PT.rc
trunk/reactos/base/applications/notepad/lang/ro-RO.rc
trunk/reactos/base/applications/notepad/lang/ru-RU.rc
trunk/reactos/base/applications/notepad/lang/sk-SK.rc
trunk/reactos/base/applications/notepad/lang/sl-SI.rc
trunk/reactos/base/applications/notepad/lang/sq-AL.rc
trunk/reactos/base/applications/notepad/lang/sv-SE.rc
trunk/reactos/base/applications/notepad/lang/th-TH.rc
trunk/reactos/base/applications/notepad/lang/tr-TR.rc
trunk/reactos/base/applications/notepad/lang/uk-UA.rc
trunk/reactos/base/applications/notepad/lang/uz-UZ.rc
trunk/reactos/base/applications/notepad/lang/zh-CN.rc
trunk/reactos/base/applications/notepad/main.c
trunk/reactos/base/applications/notepad/main.h
trunk/reactos/base/applications/notepad/notepad_res.h
trunk/reactos/base/applications/notepad/settings.c
trunk/reactos/base/applications/notepad/text.c
Removed: trunk/reactos/base/applications/notepad/ChangeLog
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/ChangeLog [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/ChangeLog (removed)
@@ -1,56 +0,0 @@
- *** This file is obsolete. Changes are listed in the main
- *** ChangeLog now. Please do not edit.
-
-Fri Jun 12 23:29:44 1998 Marcel Baur <mbaur(a)g26.ethz.ch>
- - Fixed GetDateFormat()->GetTimeFormat() for locale time.
-
-Mon May 25 14:30:00 1998 Henrik Olsen <henrik(a)iaeste.dk>
- * [Da.rc]
- - Added Danish language support.
-
-Fri May 15 23:59:22 1998 Marcel Baur <mbaur(a)g26.ethz.ch>
- - Date/Time now uses locale-specific formats
- - Language-specific window caption, displays file being edited.
- - Started with parsing of command line settings
- - Started with DoOpenFile, DoCloseFile, DoSaveFile logics
- - Prompt user to save settings when closing a file
- -> Introduced a new message box (not yet finished)
- - Fixed minor features (missing IDS in main.h, ...)
-
-Sun Mar 29 20:29:41 1998 Laurent Buffler <laurent(a)bluewin.ch>
- * [Fr.rc]
- - Added French language support.
-
-Fri Feb 27 21:03:37 1998 Karl Backström <karl_b(a)geocities.com>
- - Fixed some minor features.
-
-Sat Feb 14 17:42:29 1998 Karl Backström <karl_b(a)geocities.com>
- * NEW [language.c] [language.h]
- - Takes care of all language related stuff.
- - A new [programs] in .winerc is in use.
-
-Tue Feb 10 23:34:08 1998 Marcel Baur <mbaur(a)g26.ethz.ch>
- - Fixed broken language menus
-
-Fri Feb 06 23.54.35 1998 Karl Backström <karl_b(a)geocities.com>
- * [main.c] [main.h] [notepad.rc]
- - Fixed language support for menus.
- * NEW [dialog.c] [dialog.h]
- - Moved all menu and dialog related stuff here.
-
-Sun Jan 18 23:05:04 1998 Karl Backström <karl_b(a)geocities.com>
- * [Sw.rc]
- - Added/updated Swedish language support.
-
-Tue Dec 23 23:35:04 1997 Marcel Baur <mbaur(a)g26.ethz.ch>
- - Fixed lots of bugs w/ resources in *.rc
- - moved [notepad.c] into [main.c]
- - moved [notepad.h] into [main.h]
-
-Fri Dec 05 20:51:55 1997 Marcel Baur <mbaur(a)g26.ethz.ch>
- * [notepad.c] [notepad.h] [notepad.rc] [En.rc] [De.rc]
- [license.c] [license.h] [License_En.c]
- [README] [TODO] [ChangeLog]
- - Originals by Marcel Baur
-
-
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -35,67 +35,6 @@
static UINT_PTR CALLBACK DIALOG_PAGESETUP_Hook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
lParam);
-#ifndef UNICODE
-static LPSTR ConvertToASCII(LPSTR pszText)
-{
- int sz;
- LPWSTR pszTextW = (LPWSTR)pszText;
-
- /* default return value */
- pszText = NULL;
- do {
- /* query about requested size for conversion */
- sz = WideCharToMultiByte(CP_ACP, 0, pszTextW, -1, NULL, 0, NULL, NULL);
- if (!sz)
- break;
-
- /* get space for ASCII buffer */
- pszText = (LPSTR)HeapAlloc(GetProcessHeap(), 0, sz);
- if (pszText == NULL)
- break;
-
- /* if previous diagnostic call worked fine,
- * then this one will work too,
- * so no need to test return value here
- */
- WideCharToMultiByte(CP_ACP, 0, pszTextW, -1, pszText, sz, NULL, NULL);
- } while (0);
-
- HeapFree(GetProcessHeap(), 0, pszTextW);
- return pszText;
-}
-
-static LPWSTR ConvertToUNICODE(LPSTR pszText, DWORD *pdwSize)
-{
- int sz;
- LPWSTR pszTextW = NULL;
-
- do {
- /* query about requested size for conversion */
- sz = MultiByteToWideChar(CP_ACP, 0, pszText, -1, NULL, 0);
- if (!sz)
- break;
-
- /* get space for UNICODE buffer */
- pszTextW = HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR));
- if (pszText == NULL)
- break;
-
- /* if previous diagnostic call worked fine,
- * then this one will work too,
- * so no need to test return value here
- */
- MultiByteToWideChar(CP_ACP, 0, pszText, -1, pszTextW, sz);
-
- /* report the new size of the text to the caller */
- *pdwSize = sz;
- } while (0);
-
- HeapFree(GetProcessHeap(), 0, pszText);
- return pszTextW;
-}
-#endif
-
VOID ShowLastError(VOID)
{
DWORD error = GetLastError();
@@ -104,7 +43,7 @@
LPTSTR lpMsgBuf = NULL;
TCHAR szTitle[MAX_STRING_LEN];
- LoadString(Globals.hInstance, STRING_ERROR, szTitle, SIZEOF(szTitle));
+ LoadString(Globals.hInstance, STRING_ERROR, szTitle, ARRAY_SIZE(szTitle));
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
@@ -129,74 +68,68 @@
TCHAR szCaption[MAX_STRING_LEN];
TCHAR szNotepad[MAX_STRING_LEN];
- LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, SIZEOF(szNotepad));
+ LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, ARRAY_SIZE(szNotepad));
if (Globals.szFileTitle[0] != 0)
{
- StringCchCopy(szCaption, SIZEOF(szCaption), Globals.szFileTitle);
+ StringCchCopy(szCaption, ARRAY_SIZE(szCaption), Globals.szFileTitle);
}
else
{
- LoadString(Globals.hInstance, STRING_UNTITLED, szCaption, SIZEOF(szCaption));
- }
-
- StringCchCat(szCaption, SIZEOF(szCaption), _T(" - "));
- StringCchCat(szCaption, SIZEOF(szCaption), szNotepad);
+ LoadString(Globals.hInstance, STRING_UNTITLED, szCaption,
ARRAY_SIZE(szCaption));
+ }
+
+ StringCchCat(szCaption, ARRAY_SIZE(szCaption), _T(" - "));
+ StringCchCat(szCaption, ARRAY_SIZE(szCaption), szNotepad);
SetWindowText(Globals.hMainWnd, szCaption);
}
-static void AlertFileNotFound(LPCTSTR szFileName)
+int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCTSTR szString, DWORD dwFlags)
{
TCHAR szMessage[MAX_STRING_LEN];
TCHAR szResource[MAX_STRING_LEN];
/* Load and format szMessage */
- LoadString(Globals.hInstance, STRING_NOTFOUND, szResource, SIZEOF(szResource));
- wsprintf(szMessage, szResource, szFileName);
+ LoadString(Globals.hInstance, formatId, szResource, ARRAY_SIZE(szResource));
+ _sntprintf(szMessage, ARRAY_SIZE(szMessage), szResource, szString);
/* Load szCaption */
- LoadString(Globals.hInstance, STRING_NOTEPAD, szResource, SIZEOF(szResource));
+ if ((dwFlags & MB_ICONMASK) == MB_ICONEXCLAMATION)
+ LoadString(Globals.hInstance, STRING_ERROR, szResource, ARRAY_SIZE(szResource));
+ else
+ LoadString(Globals.hInstance, STRING_NOTEPAD, szResource,
ARRAY_SIZE(szResource));
/* Display Modal Dialog */
- MessageBox(Globals.hMainWnd, szMessage, szResource, MB_ICONEXCLAMATION);
+ // if (hParent == NULL)
+ // hParent = Globals.hMainWnd;
+ return MessageBox(hParent, szMessage, szResource, dwFlags);
+}
+
+static void AlertFileNotFound(LPCTSTR szFileName)
+{
+ DIALOG_StringMsgBox(Globals.hMainWnd, STRING_NOTFOUND, szFileName, MB_ICONEXCLAMATION
| MB_OK);
}
static int AlertFileNotSaved(LPCTSTR szFileName)
{
- TCHAR szMessage[MAX_STRING_LEN];
- TCHAR szResource[MAX_STRING_LEN];
TCHAR szUntitled[MAX_STRING_LEN];
- LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, SIZEOF(szUntitled));
-
- /* Load and format Message */
- LoadString(Globals.hInstance, STRING_NOTSAVED, szResource, SIZEOF(szResource));
- wsprintf(szMessage, szResource, szFileName[0] ? szFileName : szUntitled);
-
- /* Load Caption */
- LoadString(Globals.hInstance, STRING_NOTEPAD, szResource, SIZEOF(szResource));
-
- /* Display modal */
- return MessageBox(Globals.hMainWnd, szMessage, szResource,
MB_ICONEXCLAMATION|MB_YESNOCANCEL);
+ LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, ARRAY_SIZE(szUntitled));
+
+ return DIALOG_StringMsgBox(Globals.hMainWnd, STRING_NOTSAVED,
+ szFileName[0] ? szFileName : szUntitled,
+ MB_ICONQUESTION | MB_YESNOCANCEL);
}
static void AlertPrintError(void)
{
- TCHAR szMessage[MAX_STRING_LEN];
- TCHAR szResource[MAX_STRING_LEN];
TCHAR szUntitled[MAX_STRING_LEN];
- LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, SIZEOF(szUntitled));
-
- /* Load and format Message */
- LoadString(Globals.hInstance, STRING_PRINTERROR, szResource, SIZEOF(szResource));
- wsprintf(szMessage, szResource, Globals.szFileName[0] ? Globals.szFileName :
szUntitled);
-
- /* Load Caption */
- LoadString(Globals.hInstance, STRING_NOTEPAD, szResource, SIZEOF(szResource));
-
- /* Display modal */
- MessageBox(Globals.hMainWnd, szMessage, szResource, MB_ICONEXCLAMATION);
+ LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, ARRAY_SIZE(szUntitled));
+
+ DIALOG_StringMsgBox(Globals.hMainWnd, STRING_NOTSAVED,
+ Globals.szFileName[0] ? Globals.szFileName : szUntitled,
+ MB_ICONEXCLAMATION | MB_OK);
}
/**
@@ -317,20 +250,9 @@
}
size = GetWindowText(Globals.hEdit, pTemp, size);
-#ifndef UNICODE
- pTemp = (LPTSTR)ConvertToUNICODE(pTemp, &size);
- if (!pTemp)
- {
- /* original "pTemp" already freed */
- CloseHandle(hFile);
- ShowLastError();
- return FALSE;
- }
-#endif
-
if (size)
{
- if (!WriteText(hFile, (LPWSTR)pTemp, size, Globals.iEncoding, Globals.iEoln))
+ if (!WriteText(hFile, (LPWSTR)pTemp, size, Globals.encFile, Globals.iEoln))
{
ShowLastError();
bRet = FALSE;
@@ -404,18 +326,11 @@
goto done;
}
- if (!ReadText(hFile, (LPWSTR *)&pszText, &dwTextLen, &Globals.iEncoding,
&Globals.iEoln))
+ if (!ReadText(hFile, (LPWSTR *)&pszText, &dwTextLen, &Globals.encFile,
&Globals.iEoln))
{
ShowLastError();
goto done;
}
-#ifndef UNICODE
- pszText = ConvertToASCII(pszText);
- if (pszText == NULL) {
- ShowLastError();
- goto done;
- }
-#endif
SetWindowText(Globals.hEdit, pszText);
SendMessage(Globals.hEdit, EM_SETMODIFY, FALSE, 0);
@@ -425,7 +340,7 @@
/* If the file starts with .LOG, add a time/date at the end and set cursor after
* See
http://support.microsoft.com/?kbid=260563
*/
- if (GetWindowText(Globals.hEdit, log, SIZEOF(log)) && !_tcscmp(log, dotlog))
+ if (GetWindowText(Globals.hEdit, log, ARRAY_SIZE(log)) && !_tcscmp(log,
dotlog))
{
static const TCHAR lf[] = _T("\r\n");
SendMessage(Globals.hEdit, EM_SETSEL, GetWindowTextLength(Globals.hEdit), -1);
@@ -463,7 +378,7 @@
ZeroMemory(&openfilename, sizeof(openfilename));
- GetCurrentDirectory(SIZEOF(szDir), szDir);
+ GetCurrentDirectory(ARRAY_SIZE(szDir), szDir);
if (Globals.szFileName[0] == 0)
_tcscpy(szPath, txt_files);
else
@@ -474,7 +389,7 @@
openfilename.hInstance = Globals.hInstance;
openfilename.lpstrFilter = Globals.szFilter;
openfilename.lpstrFile = szPath;
- openfilename.nMaxFile = SIZEOF(szPath);
+ openfilename.nMaxFile = ARRAY_SIZE(szPath);
openfilename.lpstrInitialDir = szDir;
openfilename.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
openfilename.lpstrDefExt = szDefaultExt;
@@ -509,29 +424,29 @@
case WM_INITDIALOG:
hCombo = GetDlgItem(hDlg, ID_ENCODING);
- LoadString(Globals.hInstance, STRING_ANSI, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_ANSI, szText, ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
- LoadString(Globals.hInstance, STRING_UNICODE, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_UNICODE, szText, ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
- LoadString(Globals.hInstance, STRING_UNICODE_BE, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_UNICODE_BE, szText,
ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
- LoadString(Globals.hInstance, STRING_UTF8, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_UTF8, szText, ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
- SendMessage(hCombo, CB_SETCURSEL, Globals.iEncoding, 0);
+ SendMessage(hCombo, CB_SETCURSEL, Globals.encFile, 0);
hCombo = GetDlgItem(hDlg, ID_EOLN);
- LoadString(Globals.hInstance, STRING_CRLF, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_CRLF, szText, ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
- LoadString(Globals.hInstance, STRING_LF, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_LF, szText, ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
- LoadString(Globals.hInstance, STRING_CR, szText, SIZEOF(szText));
+ LoadString(Globals.hInstance, STRING_CR, szText, ARRAY_SIZE(szText));
SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText);
SendMessage(hCombo, CB_SETCURSEL, Globals.iEoln, 0);
@@ -542,7 +457,7 @@
{
hCombo = GetDlgItem(hDlg, ID_ENCODING);
if (hCombo)
- Globals.iEncoding = (int) SendMessage(hCombo, CB_GETCURSEL, 0, 0);
+ Globals.encFile = (int) SendMessage(hCombo, CB_GETCURSEL, 0, 0);
hCombo = GetDlgItem(hDlg, ID_EOLN);
if (hCombo)
@@ -561,7 +476,7 @@
ZeroMemory(&saveas, sizeof(saveas));
- GetCurrentDirectory(SIZEOF(szDir), szDir);
+ GetCurrentDirectory(ARRAY_SIZE(szDir), szDir);
if (Globals.szFileName[0] == 0)
_tcscpy(szPath, txt_files);
else
@@ -572,7 +487,7 @@
saveas.hInstance = Globals.hInstance;
saveas.lpstrFilter = Globals.szFilter;
saveas.lpstrFile = szPath;
- saveas.nMaxFile = SIZEOF(szPath);
+ saveas.nMaxFile = ARRAY_SIZE(szPath);
saveas.lpstrInitialDir = szDir;
saveas.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY |
OFN_EXPLORER | OFN_ENABLETEMPLATE | OFN_ENABLEHOOK;
@@ -1056,9 +971,9 @@
Globals.find.hwndOwner = Globals.hMainWnd;
Globals.find.hInstance = Globals.hInstance;
Globals.find.lpstrFindWhat = Globals.szFindText;
- Globals.find.wFindWhatLen = SIZEOF(Globals.szFindText);
+ Globals.find.wFindWhatLen = ARRAY_SIZE(Globals.szFindText);
Globals.find.lpstrReplaceWith = Globals.szReplaceText;
- Globals.find.wReplaceWithLen = SIZEOF(Globals.szReplaceText);
+ Globals.find.wReplaceWithLen = ARRAY_SIZE(Globals.szReplaceText);
Globals.find.Flags = FR_DOWN;
/* We only need to create the modal FindReplace dialog which will */
@@ -1097,7 +1012,7 @@
switch(uMsg) {
case WM_INITDIALOG:
hTextBox = GetDlgItem(hwndDialog, ID_LINENUMBER);
- _sntprintf(szText, SIZEOF(szText), _T("%ld"), lParam);
+ _sntprintf(szText, ARRAY_SIZE(szText), _T("%ld"), lParam);
SetWindowText(hTextBox, szText);
break;
case WM_COMMAND:
@@ -1106,7 +1021,7 @@
if (LOWORD(wParam) == IDOK)
{
hTextBox = GetDlgItem(hwndDialog, ID_LINENUMBER);
- GetWindowText(hTextBox, szText, SIZEOF(szText));
+ GetWindowText(hTextBox, szText, ARRAY_SIZE(szText));
EndDialog(hwndDialog, _ttoi(szText));
bResult = TRUE;
}
@@ -1200,9 +1115,16 @@
WinHelp(Globals.hMainWnd, helpfile, HELP_HELPONHELP, 0);
}
-#ifdef _MSC_VER
-#pragma warning(disable : 4100)
-#endif
+VOID DIALOG_HelpAboutNotepad(VOID)
+{
+ TCHAR szNotepad[MAX_STRING_LEN];
+ HICON notepadIcon = LoadIcon(Globals.hInstance, MAKEINTRESOURCE(IDI_NPICON));
+
+ LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, ARRAY_SIZE(szNotepad));
+ ShellAbout(Globals.hMainWnd, szNotepad, 0, notepadIcon);
+ DeleteObject(notepadIcon);
+}
+
INT_PTR
CALLBACK
AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
@@ -1236,16 +1158,6 @@
}
return 0;
-}
-
-VOID DIALOG_HelpAboutWine(VOID)
-{
- TCHAR szNotepad[MAX_STRING_LEN];
- HICON notepadIcon = LoadIcon(Globals.hInstance, MAKEINTRESOURCE(IDI_NPICON));
-
- LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, SIZEOF(szNotepad));
- ShellAbout(Globals.hMainWnd, szNotepad, 0, notepadIcon);
- DeleteObject(notepadIcon);
}
/***********************************************************************
@@ -1296,8 +1208,8 @@
{
case IDOK:
/* save user input and close dialog */
- GetDlgItemText(hDlg, 0x141, Globals.szHeader, SIZEOF(Globals.szHeader));
- GetDlgItemText(hDlg, 0x143, Globals.szFooter, SIZEOF(Globals.szFooter));
+ GetDlgItemText(hDlg, 0x141, Globals.szHeader,
ARRAY_SIZE(Globals.szHeader));
+ GetDlgItemText(hDlg, 0x143, Globals.szFooter,
ARRAY_SIZE(Globals.szFooter));
return FALSE;
case IDCANCEL:
Modified: trunk/reactos/base/applications/notepad/dialog.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.h [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -52,9 +52,11 @@
VOID DIALOG_HelpHelp(VOID);
VOID DIALOG_HelpLicense(VOID);
VOID DIALOG_HelpNoWarranty(VOID);
-VOID DIALOG_HelpAboutWine(VOID);
+VOID DIALOG_HelpAboutNotepad(VOID);
VOID DIALOG_TimeDate(VOID);
+
+int DIALOG_StringMsgBox(HWND hParent, int formatId, LPCTSTR szString, DWORD dwFlags);
INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
Modified: trunk/reactos/base/applications/notepad/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/bg-BG.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&ÐÐ¾Ð¼Ð¾Ñ Ð·Ð° помоÑÑа", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Ðа", CMD_ABOUT
- MENUITEM "С&ведениÑ", CMD_ABOUT_WINE
+ MENUITEM "С&ведениÑ", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/cs-CZ.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "Pomoc k ná&povÄdÄ", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&O programu...", CMD_ABOUT
- MENUITEM "In&fo...", CMD_ABOUT_WINE
+ MENUITEM "In&fo...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/da-DK.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Brug af Hjælp", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "&Om Notesblok", CMD_ABOUT_WINE
+ MENUITEM "&Om Notesblok", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/de-DE.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Hilfe benutzen", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Ãber", CMD_ABOUT
- MENUITEM "Inf&o", CMD_ABOUT_WINE
+ MENUITEM "Inf&o", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/el-GR.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Îοήθεια ÏÏη βοήθεια", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "ΠληÏο&ÏοÏίεÏ", CMD_ABOUT_WINE
+ MENUITEM "ΠληÏο&ÏοÏίεÏ", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/en-US.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Help on help", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "Inf&o", CMD_ABOUT_WINE
+ MENUITEM "Inf&o", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/es-ES.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "A&yuda sobre la ayuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Acerca de", CMD_ABOUT
- MENUITEM "&Información...", CMD_ABOUT_WINE
+ MENUITEM "&Información...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/eu-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/eu-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/eu-ES.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "Laguntzari buruz laguntza", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Ohar-blokari buruz", CMD_ABOUT
- MENUITEM "&Informazioa...", CMD_ABOUT_WINE
+ MENUITEM "&Informazioa...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/fi-FI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/fi-FI.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/fi-FI.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "Apua &Opastuksesta", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "Inf&o...", CMD_ABOUT_WINE
+ MENUITEM "Inf&o...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/fr-FR.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Utiliser l'aide", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Ã propos", CMD_ABOUT
- MENUITEM "Inf&o...", CMD_ABOUT_WINE
+ MENUITEM "Inf&o...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/he-IL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/he-IL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/he-IL.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "×¢××¨× ××¢×ר×", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "××××ת", CMD_ABOUT
- MENUITEM "××××¢", CMD_ABOUT_WINE
+ MENUITEM "××××¢", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/hu-HU.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Használat", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "Inf&ormáció...", CMD_ABOUT_WINE
+ MENUITEM "Inf&ormáció...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/hy-AM.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/hy-AM.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/hy-AM.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&ÕÕ£Õ¶Õ¸ÖÕ©ÕµÕ¸Õ¶ Ö
Õ£Õ¿Õ¡Õ£Õ¸ÖÕ®Õ¸ÖÕ´", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Ô¾ÖÕ¡Õ£ÖÕ« Õ´Õ¡Õ½Õ«Õ¶", CMD_ABOUT
- MENUITEM "&ÕÕ¥Õ²Õ¥Õ¯Õ¸ÖÕ©ÕµÕ¸ÖÕ¶...", CMD_ABOUT_WINE
+ MENUITEM "&ÕÕ¥Õ²Õ¥Õ¯Õ¸ÖÕ©ÕµÕ¸ÖÕ¶...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/id-ID.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Bantuan pada bantuan", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Tentang", CMD_ABOUT
- MENUITEM "Inf&o", CMD_ABOUT_WINE
+ MENUITEM "Inf&o", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/it-IT.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Aiuto sulla Guida", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "Informazioni &su blocco note", CMD_ABOUT
- MENUITEM "Inf&o...", CMD_ABOUT_WINE
+ MENUITEM "Inf&o...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/ja-JP.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "ãã«ãã®ä½¿ãæ¹(&H)", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "ãã¼ã¸ã§ã³æ
å ±(&A)", CMD_ABOUT
- MENUITEM "æ
å ±(&O)", CMD_ABOUT_WINE
+ MENUITEM "æ
å ±(&O)", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/lt-LT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/lt-LT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/lt-LT.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Pagalba", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Apie Notepad", CMD_ABOUT
- MENUITEM "Apie &ReactOS", CMD_ABOUT_WINE
+ MENUITEM "Apie &ReactOS", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/nl-NL.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Hulp bij Help", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "Inf&o...", CMD_ABOUT_WINE
+ MENUITEM "Inf&o...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/no-NO.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Hjelp om hjelp", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Om", CMD_ABOUT
- MENUITEM "&Infomasjon", CMD_ABOUT_WINE
+ MENUITEM "&Infomasjon", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/pl-PL.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "Pomo&c", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Notatnik - informacje", CMD_ABOUT
- MENUITEM "&ReactOS - informacje", CMD_ABOUT_WINE
+ MENUITEM "&ReactOS - informacje", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/pt-BR.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Ajuda na ajuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Sobre", CMD_ABOUT
- MENUITEM "&Informações...", CMD_ABOUT_WINE
+ MENUITEM "&Informações...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/pt-PT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/pt-PT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/pt-PT.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&Ajuda na ajuda", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Sobre", CMD_ABOUT
- MENUITEM "&Informações...", CMD_ABOUT_WINE
+ MENUITEM "&Informações...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/ro-RO.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -70,7 +70,7 @@
MENUITEM "M&anualul manualului", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Despreâ¦", CMD_ABOUT
- MENUITEM "&Infoâ¦", CMD_ABOUT_WINE
+ MENUITEM "&Infoâ¦", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/ru-RU.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&ÐÑполÑзование ÑпÑавки",
CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&РпÑогÑамме", CMD_ABOUT
- MENUITEM "&СведениÑ...", CMD_ABOUT_WINE
+ MENUITEM "&СведениÑ...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sk-SK.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -73,7 +73,7 @@
MENUITEM "&Pomoc", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "Ä&o je Poznámkový blok", CMD_ABOUT
- MENUITEM "Äo je &VÃno (Wine)", CMD_ABOUT_WINE
+ MENUITEM "Äo je &VÃno (Wine)", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/sl-SI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sl-SI.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sl-SI.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&O pomoèi", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "Inf&ormacije ...", CMD_ABOUT_WINE
+ MENUITEM "Inf&ormacije ...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sq-AL.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -69,7 +69,7 @@
MENUITEM "Ndihmë për ndihmë", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "Rreth", CMD_ABOUT
- MENUITEM "Inf&o", CMD_ABOUT_WINE
+ MENUITEM "Inf&o", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/sv-SE.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "Anvisningar för hjälpen", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "Om &Anteckningar", CMD_ABOUT
- MENUITEM "Inf&ormation...", CMD_ABOUT_WINE
+ MENUITEM "Inf&ormation...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/th-TH.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/th-TH.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/th-TH.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "à¹à¸à¸µà¹à¸¢à¸§à¸à¸±à¸à¸à¹à¸§à¸¢à¹à¸«à¸¥à¸µà¸",
CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&About", CMD_ABOUT
- MENUITEM "รายละà¹à¸à¸µà¸¢à¸...", CMD_ABOUT_WINE
+ MENUITEM "รายละà¹à¸à¸µà¸¢à¸...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/tr-TR.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -67,7 +67,7 @@
MENUITEM "&Yardım İçin Yardım", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&Bilgi...", CMD_ABOUT
- MENUITEM "&Ãzerine...", CMD_ABOUT_WINE
+ MENUITEM "&Ãzerine...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/uk-UA.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "ÐикоÑиÑÑ&Ð°Ð½Ð½Ñ Ð´Ð¾Ð²Ñдки",
CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "&ÐÑо", CMD_ABOUT
- MENUITEM "ÐÑо пÑогÑам&Ñ", CMD_ABOUT_WINE
+ MENUITEM "ÐÑо пÑогÑам&Ñ", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/uz-UZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/uz-UZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/uz-UZ.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "&ÐÑполÑзование ÑпÑавки",
CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "Bloknot h&aqida", CMD_ABOUT
- MENUITEM "&СведениÑ...", CMD_ABOUT_WINE
+ MENUITEM "&СведениÑ...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/lang/zh-CN.rc [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
MENUITEM "å¦ä½ä½¿ç¨å¸®å©(&H)", CMD_HELP_ON_HELP
MENUITEM SEPARATOR
MENUITEM "å
³äº(&A)", CMD_ABOUT
- MENUITEM "èµæä¿¡æ¯(&O)...", CMD_ABOUT_WINE
+ MENUITEM "èµæä¿¡æ¯(&O)...", CMD_HELP_ABOUT_NOTEPAD
END
END
Modified: trunk/reactos/base/applications/notepad/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/main.c [iso-8859-1] Sat Mar 14 20:00:39 2015
@@ -45,9 +45,9 @@
*/
VOID SetFileName(LPCTSTR szFileName)
{
- StringCchCopy(Globals.szFileName, SIZEOF(Globals.szFileName), szFileName);
+ StringCchCopy(Globals.szFileName, ARRAY_SIZE(Globals.szFileName), szFileName);
Globals.szFileTitle[0] = 0;
- GetFileTitle(szFileName, Globals.szFileTitle, SIZEOF(Globals.szFileTitle));
+ GetFileTitle(szFileName, Globals.szFileTitle, ARRAY_SIZE(Globals.szFileTitle));
}
/***********************************************************************
@@ -60,26 +60,26 @@
{
switch (wParam)
{
- case CMD_NEW: DIALOG_FileNew(); break;
- case CMD_OPEN: DIALOG_FileOpen(); break;
- case CMD_SAVE: DIALOG_FileSave(); break;
- case CMD_SAVE_AS: DIALOG_FileSaveAs(); break;
- case CMD_PRINT: DIALOG_FilePrint(); break;
+ case CMD_NEW: DIALOG_FileNew(); break;
+ case CMD_OPEN: DIALOG_FileOpen(); break;
+ case CMD_SAVE: DIALOG_FileSave(); break;
+ case CMD_SAVE_AS: DIALOG_FileSaveAs(); break;
+ case CMD_PRINT: DIALOG_FilePrint(); break;
case CMD_PAGE_SETUP: DIALOG_FilePageSetup(); break;
- case CMD_EXIT: DIALOG_FileExit(); break;
-
- case CMD_UNDO: DIALOG_EditUndo(); break;
- case CMD_CUT: DIALOG_EditCut(); break;
- case CMD_COPY: DIALOG_EditCopy(); break;
- case CMD_PASTE: DIALOG_EditPaste(); break;
- case CMD_DELETE: DIALOG_EditDelete(); break;
+ case CMD_EXIT: DIALOG_FileExit(); break;
+
+ case CMD_UNDO: DIALOG_EditUndo(); break;
+ case CMD_CUT: DIALOG_EditCut(); break;
+ case CMD_COPY: DIALOG_EditCopy(); break;
+ case CMD_PASTE: DIALOG_EditPaste(); break;
+ case CMD_DELETE: DIALOG_EditDelete(); break;
case CMD_SELECT_ALL: DIALOG_EditSelectAll(); break;
- case CMD_TIME_DATE: DIALOG_EditTimeDate(); break;
-
- case CMD_SEARCH: DIALOG_Search(); break;
+ case CMD_TIME_DATE: DIALOG_EditTimeDate(); break;
+
+ case CMD_SEARCH: DIALOG_Search(); break;
case CMD_SEARCH_NEXT: DIALOG_SearchNext(); break;
- case CMD_REPLACE: DIALOG_Replace(); break;
- case CMD_GOTO: DIALOG_GoTo(); break;
+ case CMD_REPLACE: DIALOG_Replace(); break;
+ case CMD_GOTO: DIALOG_GoTo(); break;
case CMD_WRAP: DIALOG_EditWrap(); break;
case CMD_FONT: DIALOG_SelectFont(); break;
@@ -87,8 +87,8 @@
case CMD_STATUSBAR: DIALOG_ViewStatusBar(); break;
case CMD_HELP_CONTENTS: DIALOG_HelpContents(); break;
- case CMD_HELP_SEARCH: DIALOG_HelpSearch(); break;
- case CMD_HELP_ON_HELP: DIALOG_HelpHelp(); break;
+ case CMD_HELP_SEARCH: DIALOG_HelpSearch(); break;
+ case CMD_HELP_ON_HELP: DIALOG_HelpHelp(); break;
case CMD_ABOUT:
DialogBox(GetModuleHandle(NULL),
@@ -97,7 +97,7 @@
AboutDialogProc);
break;
- case CMD_ABOUT_WINE: DIALOG_HelpAboutWine(); break;
+ case CMD_HELP_ABOUT_NOTEPAD: DIALOG_HelpAboutNotepad(); break;
default:
break;
@@ -217,9 +217,9 @@
/* Can't find target */
if (bShowAlert)
{
- LoadString(Globals.hInstance, STRING_CANNOTFIND, szResource,
SIZEOF(szResource));
- _sntprintf(szText, SIZEOF(szText), szResource,
pFindReplace->lpstrFindWhat);
- LoadString(Globals.hInstance, STRING_NOTEPAD, szResource,
SIZEOF(szResource));
+ LoadString(Globals.hInstance, STRING_CANNOTFIND, szResource,
ARRAY_SIZE(szResource));
+ _sntprintf(szText, ARRAY_SIZE(szText), szResource,
pFindReplace->lpstrFindWhat);
+ LoadString(Globals.hInstance, STRING_NOTEPAD, szResource,
ARRAY_SIZE(szResource));
MessageBox(Globals.hFindReplaceDlg, szText, szResource, MB_OK);
}
bSuccess = FALSE;
@@ -268,13 +268,16 @@
p += LoadString(Globals.hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN) + 1;
_tcscpy(p, txt_files);
- p += SIZEOF(txt_files);
+ p += ARRAY_SIZE(txt_files);
p += LoadString(Globals.hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN) + 1;
_tcscpy(p, all_files);
- p += SIZEOF(all_files);
+ p += ARRAY_SIZE(all_files);
*p = '\0';
Globals.find.lpstrFindWhat = NULL;
+
+ Globals.hDevMode = NULL;
+ Globals.hDevNames = NULL;
}
/***********************************************************************
@@ -288,7 +291,7 @@
CheckMenuItem(GetMenu(Globals.hMainWnd), CMD_WRAP,
MF_BYCOMMAND | (Globals.bWrapLongLines ? MF_CHECKED : MF_UNCHECKED));
- if ( !Globals.bWrapLongLines )
+ if (!Globals.bWrapLongLines)
{
CheckMenuItem(GetMenu(Globals.hMainWnd), CMD_STATUSBAR,
MF_BYCOMMAND | (Globals.bShowStatusBar ? MF_CHECKED : MF_UNCHECKED));
@@ -381,7 +384,7 @@
case WM_DESTROY:
SetWindowLongPtr(Globals.hEdit, GWLP_WNDPROC, (LONG_PTR)Globals.EditProc);
- SaveSettings();
+ NOTEPAD_SaveSettingsToRegistry();
PostQuitMessage(0);
break;
@@ -450,7 +453,7 @@
TCHAR szFileName[MAX_PATH];
HDROP hDrop = (HDROP) wParam;
- DragQueryFile(hDrop, 0, szFileName, SIZEOF(szFileName));
+ DragQueryFile(hDrop, 0, szFileName, ARRAY_SIZE(szFileName));
DragFinish(hDrop);
DoOpenFile(szFileName);
break;
@@ -483,21 +486,9 @@
static int AlertFileDoesNotExist(LPCTSTR szFileName)
{
- int nResult;
- TCHAR szMessage[MAX_STRING_LEN];
- TCHAR szResource[MAX_STRING_LEN];
-
- LoadString(Globals.hInstance, STRING_DOESNOTEXIST, szResource, SIZEOF(szResource));
- wsprintf(szMessage, szResource, szFileName);
-
- LoadString(Globals.hInstance, STRING_NOTEPAD, szResource, SIZEOF(szResource));
-
- nResult = MessageBox(Globals.hMainWnd,
- szMessage,
- szResource,
- MB_ICONEXCLAMATION | MB_YESNO);
-
- return(nResult);
+ return DIALOG_StringMsgBox(Globals.hMainWnd, STRING_DOESNOTEXIST,
+ szFileName,
+ MB_ICONEXCLAMATION | MB_YESNO);
}
static BOOL HandleCommandLine(LPTSTR cmdline)
@@ -617,7 +608,7 @@
ZeroMemory(&Globals, sizeof(Globals));
Globals.hInstance = hInstance;
- LoadSettings();
+ NOTEPAD_LoadSettingsFromRegistry();
ZeroMemory(&wndclass, sizeof(wndclass));
wndclass.cbSize = sizeof(wndclass);
Modified: trunk/reactos/base/applications/notepad/main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/main.h [iso-8859-1] Sat Mar 14 20:00:39 2015
@@ -21,7 +21,7 @@
#pragma once
-#define SIZEOF(a) (sizeof(a)/sizeof((a)[0]))
+#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
#include "notepad_res.h"
@@ -33,10 +33,22 @@
#define MAX_STRING_LEN 255
-#define ENCODING_ANSI 0
+/* Values are indexes of the items in the Encoding combobox. */
+typedef enum
+{
+ ENCODING_AUTO = -1,
+ ENCODING_ANSI = 0,
+ ENCODING_UTF16LE = 1,
+ ENCODING_UTF16BE = 2,
+ ENCODING_UTF8 = 3
+} ENCODING;
+// #define ENCODING_ANSI 0
#define ENCODING_UNICODE 1
#define ENCODING_UNICODE_BE 2
-#define ENCODING_UTF8 3
+// #define ENCODING_UTF8 3
+
+// #define MIN_ENCODING 0
+// #define MAX_ENCODING 3
#define EOLN_CRLF 0
#define EOLN_LF 1
@@ -68,7 +80,8 @@
TCHAR szHeader[MAX_PATH];
TCHAR szFooter[MAX_PATH];
TCHAR szStatusBarLineCol[MAX_PATH];
- int iEncoding;
+
+ ENCODING encFile;
int iEoln;
FINDREPLACE find;
@@ -81,12 +94,12 @@
VOID SetFileName(LPCTSTR szFileName);
/* from text.c */
-BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding, int
*piEoln);
-BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int iEncoding, int
iEoln);
+BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *pencFile, int
*piEoln);
+BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int encFile, int iEoln);
/* from settings.c */
-void LoadSettings(void);
-void SaveSettings(void);
+void NOTEPAD_LoadSettingsFromRegistry(void);
+void NOTEPAD_SaveSettingsToRegistry(void);
/* from main.c */
BOOL NOTEPAD_FindNext(FINDREPLACE *, BOOL , BOOL );
Modified: trunk/reactos/base/applications/notepad/notepad_res.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/notepad_res.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/notepad_res.h [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -65,7 +65,7 @@
#define CMD_HELP_SEARCH 0x131
#define CMD_HELP_ON_HELP 0x132
#define CMD_ABOUT 0x135
-#define CMD_ABOUT_WINE 0x137
+#define CMD_HELP_ABOUT_NOTEPAD 0x137
/* Strings */
#define STRING_PAGESETUP_HEADERVALUE 0x160
Modified: trunk/reactos/base/applications/notepad/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/settings.c [iso-8859-1] Sat Mar 14 20:00:39
2015
@@ -105,7 +105,13 @@
return QueryGeneric(hKey, pszValueName, REG_SZ, pszResult, dwResultSize *
sizeof(TCHAR));
}
-void LoadSettings(void)
+/***********************************************************************
+ *
+ * NOTEPAD_LoadSettingsFromRegistry
+ *
+ * Load settings from registry HKCU\Software\Microsoft\Notepad.
+ */
+void NOTEPAD_LoadSettingsFromRegistry(void)
{
HKEY hKey = NULL;
HFONT hFont;
@@ -124,7 +130,7 @@
QueryByte(hKey, _T("lfCharSet"), &Globals.lfFont.lfCharSet);
QueryByte(hKey, _T("lfClipPrecision"),
&Globals.lfFont.lfClipPrecision);
QueryDword(hKey, _T("lfEscapement"),
(DWORD*)&Globals.lfFont.lfEscapement);
- QueryString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName,
sizeof(Globals.lfFont.lfFaceName) / sizeof(Globals.lfFont.lfFaceName[0]));
+ QueryString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName,
ARRAY_SIZE(Globals.lfFont.lfFaceName));
QueryByte(hKey, _T("lfItalic"), &Globals.lfFont.lfItalic);
QueryDword(hKey, _T("lfOrientation"),
(DWORD*)&Globals.lfFont.lfOrientation);
QueryByte(hKey, _T("lfOutPrecision"),
&Globals.lfFont.lfOutPrecision);
@@ -136,8 +142,8 @@
QueryDword(hKey, _T("iPointSize"), &dwPointSize);
QueryBool(hKey, _T("fWrap"), &Globals.bWrapLongLines);
QueryBool(hKey, _T("fStatusBar"), &Globals.bShowStatusBar);
- QueryString(hKey, _T("szHeader"), Globals.szHeader,
sizeof(Globals.szHeader) / sizeof(Globals.szHeader[0]));
- QueryString(hKey, _T("szTrailer"), Globals.szFooter,
sizeof(Globals.szFooter) / sizeof(Globals.szFooter[0]));
+ QueryString(hKey, _T("szHeader"), Globals.szHeader,
ARRAY_SIZE(Globals.szHeader));
+ QueryString(hKey, _T("szTrailer"), Globals.szFooter,
ARRAY_SIZE(Globals.szFooter));
QueryDword(hKey, _T("iMarginLeft"), (DWORD*)&Globals.lMarginLeft);
QueryDword(hKey, _T("iMarginTop"), (DWORD*)&Globals.lMarginTop);
QueryDword(hKey, _T("iMarginRight"),
(DWORD*)&Globals.lMarginRight);
@@ -179,15 +185,22 @@
return RegSetValueEx(hKey, pszValueNameT, 0, REG_SZ, (LPBYTE) pszValue, (DWORD)
_tcslen(pszValue) * sizeof(*pszValue)) == ERROR_SUCCESS;
}
-void SaveSettings(void)
+/***********************************************************************
+ *
+ * NOTEPAD_SaveSettingsToRegistry
+ *
+ * Save settings to registry HKCU\Software\Microsoft\Notepad.
+ */
+void NOTEPAD_SaveSettingsToRegistry(void)
{
HKEY hKey;
DWORD dwDisposition;
GetWindowRect(Globals.hMainWnd, &Globals.main_rect);
- if (RegCreateKeyEx(HKEY_CURRENT_USER, s_szRegistryKey, 0, NULL, 0, KEY_ALL_ACCESS,
NULL, &hKey, &dwDisposition)
- == ERROR_SUCCESS)
+ if (RegCreateKeyEx(HKEY_CURRENT_USER, s_szRegistryKey,
+ 0, NULL, 0, KEY_ALL_ACCESS, NULL,
+ &hKey, &dwDisposition) == ERROR_SUCCESS)
{
SaveDword(hKey, _T("lfCharSet"), Globals.lfFont.lfCharSet);
SaveDword(hKey, _T("lfClipPrecision"),
Globals.lfFont.lfClipPrecision);
@@ -214,6 +227,7 @@
SaveDword(hKey, _T("iWindowPosY"), Globals.main_rect.top);
SaveDword(hKey, _T("iWindowPosDX"), Globals.main_rect.right -
Globals.main_rect.left);
SaveDword(hKey, _T("iWindowPosDY"), Globals.main_rect.bottom -
Globals.main_rect.top);
+
RegCloseKey(hKey);
}
}
Modified: trunk/reactos/base/applications/notepad/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/text.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/text.c [iso-8859-1] Sat Mar 14 20:00:39 2015
@@ -48,7 +48,7 @@
}
BOOL
-ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding, int
*piEoln)
+ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *pencFile, int *piEoln)
{
DWORD dwSize;
LPBYTE pBytes = NULL;
@@ -58,7 +58,7 @@
DWORD dwCharCount;
BOOL bSuccess = FALSE;
BYTE b = 0;
- int iEncoding = ENCODING_ANSI;
+ int encFile = ENCODING_ANSI;
int iCodePage = 0;
WCHAR szCrlf[2] = {'\r', '\n'};
DWORD adwEolnCount[3] = {0, 0, 0};
@@ -85,21 +85,21 @@
/* Look for Byte Order Marks */
if ((dwSize >= 2) && (pBytes[0] == 0xFF) && (pBytes[1] == 0xFE))
{
- iEncoding = ENCODING_UNICODE;
+ encFile = ENCODING_UNICODE;
dwPos += 2;
}
else if ((dwSize >= 2) && (pBytes[0] == 0xFE) && (pBytes[1] ==
0xFF))
{
- iEncoding = ENCODING_UNICODE_BE;
+ encFile = ENCODING_UNICODE_BE;
dwPos += 2;
}
else if ((dwSize >= 3) && (pBytes[0] == 0xEF) && (pBytes[1] ==
0xBB) && (pBytes[2] == 0xBF))
{
- iEncoding = ENCODING_UTF8;
+ encFile = ENCODING_UTF8;
dwPos += 3;
}
- switch(iEncoding)
+ switch(encFile)
{
case ENCODING_UNICODE_BE:
for (i = dwPos; i < dwSize-1; i += 2)
@@ -117,9 +117,9 @@
case ENCODING_ANSI:
case ENCODING_UTF8:
- if (iEncoding == ENCODING_ANSI)
+ if (encFile == ENCODING_ANSI)
iCodePage = CP_ACP;
- else if (iEncoding == ENCODING_UTF8)
+ else if (encFile == ENCODING_UTF8)
iCodePage = CP_UTF8;
if ((dwSize - dwPos) > 0)
@@ -166,7 +166,7 @@
case '\n':
if (!Append(ppszText, pdwTextLen, &pszText[dwPos], i - dwPos))
return FALSE;
- if (!Append(ppszText, pdwTextLen, szCrlf, sizeof(szCrlf) /
sizeof(szCrlf[0])))
+ if (!Append(ppszText, pdwTextLen, szCrlf, ARRAY_SIZE(szCrlf)))
return FALSE;
dwPos = i + 1;
@@ -202,7 +202,7 @@
*piEoln = EOLN_LF;
if (adwEolnCount[EOLN_CR] > adwEolnCount[*piEoln])
*piEoln = EOLN_CR;
- *piEncoding = iEncoding;
+ *pencFile = encFile;
bSuccess = TRUE;
@@ -221,7 +221,7 @@
return bSuccess;
}
-static BOOL WriteEncodedText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int
iEncoding)
+static BOOL WriteEncodedText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int
encFile)
{
LPBYTE pBytes = NULL;
LPBYTE pAllocBuffer = NULL;
@@ -236,7 +236,7 @@
while(dwPos < dwTextLen)
{
- switch(iEncoding)
+ switch(encFile)
{
case ENCODING_UNICODE:
pBytes = (LPBYTE) &pszText[dwPos];
@@ -262,9 +262,9 @@
case ENCODING_ANSI:
case ENCODING_UTF8:
- if (iEncoding == ENCODING_ANSI)
+ if (encFile == ENCODING_ANSI)
iCodePage = CP_ACP;
- else if (iEncoding == ENCODING_UTF8)
+ else if (encFile == ENCODING_UTF8)
iCodePage = CP_UTF8;
iRequiredBytes = WideCharToMultiByte(iCodePage, 0, &pszText[dwPos],
dwTextLen - dwPos, NULL, 0, NULL, NULL);
@@ -315,17 +315,17 @@
return bSuccess;
}
-BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int iEncoding, int iEoln)
+BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int encFile, int iEoln)
{
WCHAR wcBom;
LPCWSTR pszLF = L"\n";
DWORD dwPos, dwNext;
/* Write the proper byte order marks if not ANSI */
- if (iEncoding != ENCODING_ANSI)
+ if (encFile != ENCODING_ANSI)
{
wcBom = 0xFEFF;
- if (!WriteEncodedText(hFile, &wcBom, 1, iEncoding))
+ if (!WriteEncodedText(hFile, &wcBom, 1, encFile))
return FALSE;
}
@@ -350,20 +350,20 @@
{
case EOLN_LF:
/* Write text (without eoln) */
- if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos,
iEncoding))
+ if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos,
encFile))
return FALSE;
/* Write eoln */
- if (!WriteEncodedText(hFile, pszLF, 1, iEncoding))
+ if (!WriteEncodedText(hFile, pszLF, 1, encFile))
return FALSE;
break;
case EOLN_CR:
/* Write text (including \r as eoln) */
- if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos + 1,
iEncoding))
+ if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos + 1,
encFile))
return FALSE;
break;
case EOLN_CRLF:
/* Write text (including \r\n as eoln) */
- if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos + 2,
iEncoding))
+ if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos + 2,
encFile))
return FALSE;
break;
default:
@@ -373,7 +373,7 @@
else
{
/* Write text (without eoln, since this is the end of the file) */
- if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos,
iEncoding))
+ if (!WriteEncodedText(hFile, &pszText[dwPos], dwNext - dwPos, encFile))
return FALSE;
}