Author: tkreuzer
Date: Sun Feb 20 10:55:48 2011
New Revision: 50830
URL:
http://svn.reactos.org/svn/reactos?rev=50830&view=rev
Log:
[CHARMAP]
Patch by Carlo Bramini (carlo bramix at libero dot it)
- Make the text copy field a richedit control.
- Use WM_CHAR to copy the characters
- Fix definition of MSFTEDIT_CLASS for the resource compiler
See issue #5275 for more details.
Modified:
trunk/reactos/base/applications/charmap/charmap.c
trunk/reactos/base/applications/charmap/charmap.rc
trunk/reactos/base/applications/charmap/lang/bg-BG.rc
trunk/reactos/base/applications/charmap/lang/ca-ES.rc
trunk/reactos/base/applications/charmap/lang/cs-CZ.rc
trunk/reactos/base/applications/charmap/lang/de-DE.rc
trunk/reactos/base/applications/charmap/lang/el-GR.rc
trunk/reactos/base/applications/charmap/lang/en-US.rc
trunk/reactos/base/applications/charmap/lang/es-ES.rc
trunk/reactos/base/applications/charmap/lang/fr-FR.rc
trunk/reactos/base/applications/charmap/lang/id-ID.rc
trunk/reactos/base/applications/charmap/lang/it-IT.rc
trunk/reactos/base/applications/charmap/lang/ja-JP.rc
trunk/reactos/base/applications/charmap/lang/ko-KR.rc
trunk/reactos/base/applications/charmap/lang/lt-LT.rc
trunk/reactos/base/applications/charmap/lang/nl-NL.rc
trunk/reactos/base/applications/charmap/lang/no-NO.rc
trunk/reactos/base/applications/charmap/lang/pl-PL.rc
trunk/reactos/base/applications/charmap/lang/pt-BR.rc
trunk/reactos/base/applications/charmap/lang/ru-RU.rc
trunk/reactos/base/applications/charmap/lang/sk-SK.rc
trunk/reactos/base/applications/charmap/lang/uk-UA.rc
trunk/reactos/base/applications/charmap/lang/zh-CN.rc
trunk/reactos/base/applications/charmap/lang/zh-TW.rc
trunk/reactos/base/applications/charmap/map.c
trunk/reactos/base/applications/charmap/precomp.h
trunk/reactos/include/psdk/richedit.h
Modified: trunk/reactos/base/applications/charmap/charmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/charmap.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/charmap.c [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -133,57 +133,96 @@
}
}
-
+// Copy collected characters into the clipboard
+static
+void
+CopyCharacters(HWND hDlg)
+{
+ HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
+ DWORD dwStart, dwEnd;
+
+ // Acquire selection limits
+ SendMessage(hText, EM_GETSEL, (WPARAM)&dwStart, (LPARAM)&dwEnd);
+
+ // Test if the whose text is unselected
+ if(dwStart == dwEnd) {
+
+ // Select the whole text
+ SendMessageW(hText, EM_SETSEL, 0, -1);
+
+ // Copy text
+ SendMessageW(hText, WM_COPY, 0, 0);
+
+ // Restore previous values
+ SendMessageW(hText, EM_SETSEL, (WPARAM)dwStart, (LPARAM)dwEnd);
+
+ } else {
+
+ // Copy text
+ SendMessageW(hText, WM_COPY, 0, 0);
+ }
+}
+
+// Recover charset for the given font
+static
+BYTE
+GetFontMetrics(HWND hWnd, HFONT hFont)
+{
+ TEXTMETRIC tmFont;
+ HGDIOBJ hOldObj;
+ HDC hDC;
+
+ hDC = GetDC(hWnd);
+ hOldObj = SelectObject(hDC, hFont);
+ GetTextMetrics(hDC, &tmFont);
+ SelectObject(hDC, hOldObj);
+ ReleaseDC(hWnd, hDC);
+
+ return tmFont.tmCharSet;
+}
+
+// Select a new character
static
VOID
-AddCharToSelection(HWND hText,
- WCHAR ch)
-{
- LPWSTR lpText;
- INT Len = GetWindowTextLength(hText);
-
- if (Len != 0)
+AddCharToSelection(HWND hDlg, WCHAR ch)
+{
+ HWND hMap = GetDlgItem(hDlg, IDC_FONTMAP);
+ HWND hText = GetDlgItem(hDlg, IDC_TEXTBOX);
+ HFONT hFont;
+ LOGFONT lFont;
+ CHARFORMAT cf;
+
+ // Retrieve current character selected
+ if (ch == 0)
{
- lpText = HeapAlloc(GetProcessHeap(),
- 0,
- (Len + 2) * sizeof(WCHAR));
-
- if (lpText)
- {
- LPWSTR lpStr = lpText;
-
- SendMessageW(hText,
- WM_GETTEXT,
- Len + 1,
- (LPARAM)lpStr);
-
- lpStr += Len;
- *lpStr = ch;
- lpStr++;
- *lpStr = L'\0';
-
- SendMessageW(hText,
- WM_SETTEXT,
- 0,
- (LPARAM)lpText);
-
- HeapFree(GetProcessHeap(),
- 0,
- lpText);
- }
- }
- else
- {
- WCHAR szText[2];
-
- szText[0] = ch;
- szText[1] = L'\0';
-
- SendMessageW(hText,
- WM_SETTEXT,
- 0,
- (LPARAM)szText);
- }
+ ch = (WCHAR) SendMessageW(hMap, FM_GETCHAR, 0, 0);
+ if (!ch)
+ return;
+ }
+
+ // Retrieve current selected font
+ hFont = (HFONT)SendMessage(hMap, FM_GETHFONT, 0, 0);
+
+ // Recover LOGFONT structure from hFont
+ if (!GetObject(hFont, sizeof(LOGFONT), &lFont))
+ return;
+
+ // Recover font properties of Richedit control
+ ZeroMemory(&cf, sizeof(cf));
+ cf.cbSize = sizeof(cf);
+ SendMessage(hText, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
+
+ // Apply properties of the new font
+ cf.bCharSet = GetFontMetrics(hText, hFont);
+
+ // Update font name
+ wcscpy(cf.szFaceName, lFont.lfFaceName);
+
+ // Update font properties
+ SendMessage(hText, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
+
+ // Send selected character to Richedit
+ SendMessage(hText, WM_CHAR, (WPARAM)ch, 0);
}
@@ -204,6 +243,7 @@
case WM_INITDIALOG:
{
HMENU hSysMenu;
+ DWORD evMask;
hSmIcon = LoadImageW(hInstance,
MAKEINTRESOURCEW(IDI_ICON),
@@ -256,6 +296,12 @@
lpAboutText);
}
}
+
+ // Configure Richedi control for sending notification changes.
+ evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
+ evMask |= ENM_CHANGE;
+ SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_SETEVENTMASK, 0, (LPARAM)evMask);
+
return TRUE;
}
@@ -264,41 +310,39 @@
switch(LOWORD(wParam))
{
case IDC_FONTMAP:
- {
switch (HIWORD(wParam))
{
case FM_SETCHAR:
- AddCharToSelection(GetDlgItem(hDlg, IDC_TEXTBOX),
- LOWORD(lParam));
+ AddCharToSelection(hDlg, LOWORD(lParam));
break;
}
- }
- break;
+ break;
case IDC_FONTCOMBO:
- {
if (HIWORD(wParam) == CBN_SELCHANGE)
{
ChangeMapFont(hDlg);
}
- }
- break;
+ break;
case IDC_SELECT:
- {
- WCHAR ch;
- HWND hMap = GetDlgItem(hDlg, IDC_FONTMAP);
-
- ch = (WCHAR) SendMessageW(hMap, FM_GETCHAR, 0, 0);
-
- if (ch)
- {
- AddCharToSelection(GetDlgItem(hDlg, IDC_TEXTBOX),
- ch);
+ AddCharToSelection(hDlg, 0);
+ break;
+
+ case IDC_TEXTBOX:
+ switch (HIWORD(wParam)) {
+ case EN_CHANGE:
+ if (GetWindowTextLength(GetDlgItem(hDlg, IDC_TEXTBOX)) == 0)
+ EnableWindow(GetDlgItem(hDlg, IDC_COPY), FALSE);
+ else
+ EnableWindow(GetDlgItem(hDlg, IDC_COPY), TRUE);
+ break;
}
-
- break;
- }
+ break;
+
+ case IDC_COPY:
+ CopyCharacters(hDlg);
+ break;
case IDOK:
if (hSmIcon)
@@ -306,7 +350,7 @@
if (hBgIcon)
DestroyIcon(hBgIcon);
EndDialog(hDlg, 0);
- break;
+ break;
}
}
break;
@@ -347,6 +391,7 @@
{
INITCOMMONCONTROLSEX iccx;
INT Ret = 1;
+ HMODULE hRichEd20;
hInstance = hInst;
@@ -356,11 +401,17 @@
if (RegisterMapClasses(hInstance))
{
- Ret = DialogBoxW(hInstance,
- MAKEINTRESOURCEW(IDD_CHARMAP),
- NULL,
- DlgProc) >= 0;
-
+ hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
+
+ if (hRichEd20 != NULL)
+ {
+ Ret = DialogBoxW(hInstance,
+ MAKEINTRESOURCEW(IDD_CHARMAP),
+ NULL,
+ DlgProc) >= 0;
+
+ FreeLibrary(hRichEd20);
+ }
UnregisterMapClasses(hInstance);
}
Modified: trunk/reactos/base/applications/charmap/charmap.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/charmap.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/charmap.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -1,5 +1,6 @@
#include <windows.h>
#include <commctrl.h>
+#include <richedit.h>
#include "resource.h"
Modified: trunk/reactos/base/applications/charmap/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/bg-BG.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Ïîìîù", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Çíàöè çà çàïîìíÿíå:", IDC_STATIC, 3, 188, 75, 9
- EDITTEXT IDC_TEXTBOX, 79, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Èçáîð", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Çàïîìíÿíå", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Ðaçøèðåí èçãëåä", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/ca-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/ca-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/ca-ES.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Ajuda", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Caràcters a copiar :", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selecciona", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copia", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Vista avançada", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/cs-CZ.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -15,7 +15,7 @@
PUSHBUTTON "Nápovìda", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Znaky ke zkopírování:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Oznaèit", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopírovat", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Pokroèilé zobrazení", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD
| WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/de-DE.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Hilfe", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Zeichenauswahl:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Auswählen", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopieren", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Erweiterte Ansicht", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/el-GR.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -12,7 +12,7 @@
CONTROL "",IDC_FONTMAP,"FontMapWnd",WS_VSCROLL |
WS_TABSTOP,20,
22,266,156
LTEXT "×áñáêôÞñåò ðñïò áíôéãñáöÞ :",IDC_STATIC,6,184,66,17
- EDITTEXT IDC_TEXTBOX,74,186,114,13
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "ÅðéëïãÞ",IDC_SELECT,194,186,44,13
PUSHBUTTON "ÁíôéãñáöÞ",IDC_COPY,242,186,44,13,WS_DISABLED
END
Modified: trunk/reactos/base/applications/charmap/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/en-US.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Help", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Characters to copy:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Select", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copy", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/es-ES.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Ayuda", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Caracteres a copiar :", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Seleccionar", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copiar", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Vista Avanzada", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/fr-FR.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Aide", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Caractères à copier :", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Sélectionner", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copier", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Vue avancée", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/id-ID.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Bantuan", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Karakter untuk di-copy :", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Pilih", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copy", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/it-IT.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Aiuto", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Caratteri da copiare :", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selezionare", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Copiare", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Visualizzazione avanzata", IDC_ADVVIEW, 10, 204, 64, 9,
WS_CHILD | WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/ja-JP.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "wv", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Rs[Ꭶ:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Ið", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Rs[", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Ú×\\¦", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/ko-KR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/ko-KR.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -13,7 +13,7 @@
PUSHBUTTON "µµ¿ò¸»", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "º¹»çÇÒ ¹®ÀÚ:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "¼±ÅÃ", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "º¹»ç", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "È®Àå ¸ðµå", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/lt-LT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/lt-LT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/lt-LT.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -19,7 +19,7 @@
PUSHBUTTON "Pagalba", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Simboliai kopijavimui:", IDC_STATIC, 6, 188, 72, 9
- EDITTEXT IDC_TEXTBOX, 81, 186, 107, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Parinkti", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopijuoti", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/nl-NL.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Help", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Te kopiëren tekens:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selecteren", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopiëren", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Geavanceerde weergave", IDC_ADVVIEW, 10, 204, 64, 9,
WS_CHILD | WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/no-NO.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Hjelp", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Kopier følgende tegn:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Velg", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Kopier", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Avansert visning", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/pl-PL.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -16,7 +16,7 @@
PUSHBUTTON "Pomo&c", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "&Znaki do skopiowania:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Wy&bierz", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "&Kopiuj", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Widok z&aawansowany", IDC_ADVVIEW, 10, 204, 64, 9,
WS_CHILD | WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/pt-BR.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -10,7 +10,7 @@
PUSHBUTTON "Aj&uda", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Caracteres a serem copiados :", IDC_STATIC, 6, 183, 66, 17
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Selecionar", IDC_SELECT, 194, 186, 46, 13
PUSHBUTTON "Copiar", IDC_COPY, 244, 186, 46, 13, WS_DISABLED
//AUTOCHECKBOX "Modo de exibição avançado", IDC_ADVVIEW, 10, 204, 64, 9,
WS_CHILD | WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/ru-RU.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -12,7 +12,7 @@
PUSHBUTTON "Ñïðàâêà", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Êîïèðîâàòü ñèìâîë:", IDC_STATIC, 6, 188, 95, 9
- EDITTEXT IDC_TEXTBOX, 80, 186, 109, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Âûáðàòü", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Êîïèðîâàòü", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/sk-SK.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -19,7 +19,7 @@
PUSHBUTTON "&Pomocník", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Kopírova &znaky:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "&Vybra", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "&Kopírova", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "R&ozírené zobrazenie", IDC_ADVVIEW, 10, 204, 75, 9,
WS_CHILD | WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/uk-UA.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -18,7 +18,7 @@
PUSHBUTTON "Äîâ³äêà", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "Äëÿ êîï³þâàííÿ :", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Âèáðàòè", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "Êîï³þâàòè", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Ðîçøèðåíèé âèãëÿä", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/zh-CN.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -12,7 +12,7 @@
PUSHBUTTON "˵Ã÷", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "´ý¸´ÖƵÄ×Ö·û:", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "Ñ¡Ôñ", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "¸´ÖÆ", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lang/zh-TW.rc [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -12,7 +12,7 @@
PUSHBUTTON "»¡©ú", IDC_CMHELP, 249, 5, 35, 13
CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE
| WS_TABSTOP | WS_VSCROLL, 20, 22, 266, 156
LTEXT "«Ý½Æ»sªº¦r²Å¡G", IDC_STATIC, 6, 188, 66, 9
- EDITTEXT IDC_TEXTBOX, 74, 186, 114, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP
+ CONTROL "",IDC_TEXTBOX,RICHEDIT_CLASS,ES_AUTOHSCROLL | WS_BORDER |
WS_CHILD | WS_VISIBLE | WS_TABSTOP, 74, 186, 114, 13
DEFPUSHBUTTON "¿ï¾Ü", IDC_SELECT, 194, 186, 44, 13
PUSHBUTTON "½Æ»s", IDC_COPY, 242, 186, 44, 13, WS_DISABLED
//AUTOCHECKBOX "Advanced view", IDC_ADVVIEW, 10, 204, 64, 9, WS_CHILD |
WS_VISIBLE | WS_TABSTOP
Modified: trunk/reactos/base/applications/charmap/map.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/map.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/map.c [iso-8859-1] Sun Feb 20 10:55:48 2011
@@ -529,6 +529,9 @@
return infoPtr->pActiveCell->ch;
}
+ case FM_GETHFONT:
+ return (LRESULT)infoPtr->hFont;
+
case WM_PAINT:
{
OnPaint(infoPtr,
Modified: trunk/reactos/base/applications/charmap/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/precomp.h [iso-8859-1] Sun Feb 20 10:55:48
2011
@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <windows.h>
#include <commctrl.h>
+#include <richedit.h>
#include "resource.h"
#define XCELLS 20
@@ -12,9 +13,10 @@
#define XLARGE 45
#define YLARGE 25
-#define FM_SETFONT (WM_USER + 1)
-#define FM_GETCHAR (WM_USER + 2)
-#define FM_SETCHAR (WM_USER + 3)
+#define FM_SETFONT (WM_USER + 1)
+#define FM_GETCHAR (WM_USER + 2)
+#define FM_SETCHAR (WM_USER + 3)
+#define FM_GETHFONT (WM_USER + 4)
extern HINSTANCE hInstance;
Modified: trunk/reactos/include/psdk/richedit.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/richedit.h?re…
==============================================================================
--- trunk/reactos/include/psdk/richedit.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/richedit.h [iso-8859-1] Sun Feb 20 10:55:48 2011
@@ -32,19 +32,20 @@
#define cchTextLimitDefault 0x7fff
-#if defined(__GNUC__)
+#if defined(_MSC_VER) || defined(RC_INVOKED)
+# define MSFTEDIT_CLASS L"RichEdit50W"
+#elif defined(__GNUC__)
# define MSFTEDIT_CLASS (const WCHAR []){
'R','i','c','h','E','d','i','t','5','0','W',0
}
-#elif defined(_MSC_VER)
-# define MSFTEDIT_CLASS L"RichEdit50W"
#else
static const WCHAR MSFTEDIT_CLASS[] = {
'R','i','c','h','E','d','i','t','5','0','W',0
};
#endif
#define RICHEDIT_CLASS20A "RichEdit20A"
-#if defined(__GNUC__)
+
+#if defined(_MSC_VER) || defined(RC_INVOKED)
+# define RICHEDIT_CLASS20W L"RichEdit20W"
+#elif defined(__GNUC__)
# define RICHEDIT_CLASS20W (const WCHAR []){
'R','i','c','h','E','d','i','t','2','0','W',0
}
-#elif defined(_MSC_VER)
-# define RICHEDIT_CLASS20W L"RichEdit20W"
#else
static const WCHAR RICHEDIT_CLASS20W[] = {
'R','i','c','h','E','d','i','t','2','0','W',0
};
#endif