Module: wine Branch: master Commit: 566dcd78fe3a7d8cafde7198cf8e20bf56e666c3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=566dcd78fe3a7d8cafde7198cf...
Author: Andrey Turkin andrey.turkin@gmail.com Date: Thu Oct 9 22:34:01 2008 +0400
wordpad: Fix some unicode bugs.
---
programs/wordpad/En.rc | 1 + programs/wordpad/Ru.rc | 1 + programs/wordpad/wordpad.c | 15 +++++++-------- programs/wordpad/wordpad.h | 1 + 4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/programs/wordpad/En.rc b/programs/wordpad/En.rc index b9e4552..be4ccc9 100644 --- a/programs/wordpad/En.rc +++ b/programs/wordpad/En.rc @@ -238,4 +238,5 @@ BEGIN STRING_WRITE_ACCESS_DENIED, "You do not have access to save the file." STRING_OPEN_FAILED, "Could not open the file." STRING_OPEN_ACCESS_DENIED, "You do not have access to open the file." + STRING_PRINTING_NOT_IMPLEMENTED, "Printing not implemented" END diff --git a/programs/wordpad/Ru.rc b/programs/wordpad/Ru.rc index d4a67f9..0d040b7 100644 --- a/programs/wordpad/Ru.rc +++ b/programs/wordpad/Ru.rc @@ -234,4 +234,5 @@ BEGIN "���� ��������?" STRING_INVALID_NUMBER, "������������ �������� ������" STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage ��������� �� ��������������" + STRING_PRINTING_NOT_IMPLEMENTED, "������ �� ��������������" END diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index adad55c..3a77fa0 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -49,11 +49,10 @@ #endif
/* use LoadString */ -static const WCHAR xszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0}; +static const WCHAR wszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0};
static const WCHAR wszRichEditClass[] = {'R','I','C','H','E','D','I','T','2','0','W',0}; static const WCHAR wszMainWndClass[] = {'W','O','R','D','P','A','D','T','O','P',0}; -static const WCHAR wszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0};
static const WCHAR stringFormat[] = {'%','2','d','\0'};
@@ -1153,7 +1152,7 @@ static void HandleCommandLine(LPWSTR cmdline) }
if (opt_print) - MessageBox(hMainWnd, "Printing not implemented", "WordPad", MB_OK); + MessageBoxW(hMainWnd, MAKEINTRESOURCEW(STRING_PRINTING_NOT_IMPLEMENTED), wszAppTitle, MB_OK); }
static LRESULT handle_findmsg(LPFINDREPLACEW pFr) @@ -1946,8 +1945,8 @@ static LRESULT OnNotify( HWND hWnd, LPARAM lParam)
sprintf( buf,"selection = %d..%d, line count=%ld", pSC->chrg.cpMin, pSC->chrg.cpMax, - SendMessage(hwndEditor, EM_GETLINECOUNT, 0, 0)); - SetWindowText(GetDlgItem(hWnd, IDC_STATUSBAR), buf); + SendMessage(hwndEditor, EM_GETLINECOUNT, 0, 0)); + SetWindowTextA(GetDlgItem(hWnd, IDC_STATUSBAR), buf); SendMessage(hWnd, WM_USER, 0, 0); return 1; } @@ -2136,7 +2135,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam) TEXTRANGEW tr;
GetWindowTextW(hwndEditor, data, nLen+1); - MessageBoxW(NULL, data, xszAppTitle, MB_OK); + MessageBoxW(NULL, data, wszAppTitle, MB_OK);
HeapFree( GetProcessHeap(), 0, data); data = HeapAlloc(GetProcessHeap(), 0, (nLen+1)*sizeof(WCHAR)); @@ -2144,7 +2143,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam) tr.chrg.cpMax = nLen; tr.lpstrText = data; SendMessage (hwndEditor, EM_GETTEXTRANGE, 0, (LPARAM)&tr); - MessageBoxW(NULL, data, xszAppTitle, MB_OK); + MessageBoxW(NULL, data, wszAppTitle, MB_OK); HeapFree( GetProcessHeap(), 0, data );
/* SendMessage(hwndEditor, EM_SETSEL, 0, -1); */ @@ -2184,7 +2183,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam) SendMessage(hwndEditor, EM_GETSELTEXT, 0, (LPARAM)data); sprintf(buf, "Start = %d, End = %d", range.cpMin, range.cpMax); MessageBoxA(hWnd, buf, "Editor", MB_OK); - MessageBoxW(hWnd, data, xszAppTitle, MB_OK); + MessageBoxW(hWnd, data, wszAppTitle, MB_OK); HeapFree( GetProcessHeap(), 0, data); /* SendMessage(hwndEditor, EM_SETSEL, 0, -1); */ return 0; diff --git a/programs/wordpad/wordpad.h b/programs/wordpad/wordpad.h index 9f093b3..8884e28 100644 --- a/programs/wordpad/wordpad.h +++ b/programs/wordpad/wordpad.h @@ -197,6 +197,7 @@ #define STRING_WRITE_ACCESS_DENIED 1708 #define STRING_OPEN_FAILED 1709 #define STRING_OPEN_ACCESS_DENIED 1710 +#define STRING_PRINTING_NOT_IMPLEMENTED 1711
LPWSTR file_basename(LPWSTR);