Index: base/applications/charmap/charmap.c =================================================================== --- base/applications/charmap/charmap.c (revision 75907) +++ base/applications/charmap/charmap.c (working copy) @@ -4,7 +4,7 @@ * FILE: base/applications/charmap/charmap.c * PURPOSE: main dialog implementation * COPYRIGHT: Copyright 2007 Ged Murphy - * + * Copyright 2017 Katayama Hirofumi MZ */ #include "precomp.h" @@ -511,6 +511,9 @@ } break; + case WM_SETFOCUS: + SetFocus(GetDlgItem(hCharmapDlg, IDC_FONTMAP)); + break; } return DefWindowProc(hWnd, msg, wParam, lParam); @@ -625,6 +628,12 @@ break; } + if (IsWindow(hCharmapDlg) && IsDialogMessage(hCharmapDlg, &Msg)) + continue; + + if (IsWindow(hAdvancedDlg) && IsDialogMessage(hAdvancedDlg, &Msg)) + continue; + TranslateMessage(&Msg); DispatchMessage(&Msg); } Index: base/applications/charmap/lang/bg-BG.rc =================================================================== --- base/applications/charmap/lang/bg-BG.rc (revision 75907) +++ base/applications/charmap/lang/bg-BG.rc (working copy) @@ -5,10 +5,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Шрифт :", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Помощ", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/ca-ES.rc =================================================================== --- base/applications/charmap/lang/ca-ES.rc (revision 75907) +++ base/applications/charmap/lang/ca-ES.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Ajuda", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/cs-CZ.rc =================================================================== --- base/applications/charmap/lang/cs-CZ.rc (revision 75907) +++ base/applications/charmap/lang/cs-CZ.rc (working copy) @@ -7,10 +7,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Písmo:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Nápověda", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/de-DE.rc =================================================================== --- base/applications/charmap/lang/de-DE.rc (revision 75907) +++ base/applications/charmap/lang/de-DE.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Schrift:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "&Hilfe", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/el-GR.rc =================================================================== --- base/applications/charmap/lang/el-GR.rc (revision 75907) +++ base/applications/charmap/lang/el-GR.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Γραμματοσειρά :", IDC_STATIC, 6, 7, 60, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Βοήθεια", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/en-US.rc =================================================================== --- base/applications/charmap/lang/en-US.rc (revision 75907) +++ base/applications/charmap/lang/en-US.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "&Font:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "&Help", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/es-ES.rc =================================================================== --- base/applications/charmap/lang/es-ES.rc (revision 75907) +++ base/applications/charmap/lang/es-ES.rc (working copy) @@ -5,10 +5,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Fuente:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Ayuda", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/fr-FR.rc =================================================================== --- base/applications/charmap/lang/fr-FR.rc (revision 75907) +++ base/applications/charmap/lang/fr-FR.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Police :", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Aide", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/he-IL.rc =================================================================== --- base/applications/charmap/lang/he-IL.rc (revision 75907) +++ base/applications/charmap/lang/he-IL.rc (working copy) @@ -3,10 +3,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "גופן", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "עזרה", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/id-ID.rc =================================================================== --- base/applications/charmap/lang/id-ID.rc (revision 75907) +++ base/applications/charmap/lang/id-ID.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Bantuan", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/it-IT.rc =================================================================== --- base/applications/charmap/lang/it-IT.rc (revision 75907) +++ base/applications/charmap/lang/it-IT.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Aiuto", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/ja-JP.rc =================================================================== --- base/applications/charmap/lang/ja-JP.rc (revision 75907) +++ base/applications/charmap/lang/ja-JP.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 9, "MS UI Gothic", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "フォント:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "ヘルプ", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/ko-KR.rc =================================================================== --- base/applications/charmap/lang/ko-KR.rc (revision 75907) +++ base/applications/charmap/lang/ko-KR.rc (working copy) @@ -6,10 +6,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 9, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "글꼴:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "도움말", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/lt-LT.rc =================================================================== --- base/applications/charmap/lang/lt-LT.rc (revision 75907) +++ base/applications/charmap/lang/lt-LT.rc (working copy) @@ -11,10 +11,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Šriftas:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Pagalba", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/nl-NL.rc =================================================================== --- base/applications/charmap/lang/nl-NL.rc (revision 75907) +++ base/applications/charmap/lang/nl-NL.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Lettertype:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Help", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/no-NO.rc =================================================================== --- base/applications/charmap/lang/no-NO.rc (revision 75907) +++ base/applications/charmap/lang/no-NO.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Skrift:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Hjelp", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/pl-PL.rc =================================================================== --- base/applications/charmap/lang/pl-PL.rc (revision 75907) +++ base/applications/charmap/lang/pl-PL.rc (working copy) @@ -10,10 +10,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Czci&onka:", IDC_STATIC, 6, 7, 28, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Pomo&c", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/pt-BR.rc =================================================================== --- base/applications/charmap/lang/pt-BR.rc (revision 75907) +++ base/applications/charmap/lang/pt-BR.rc (working copy) @@ -2,10 +2,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "&Fonte:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Aj&uda", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/ro-RO.rc =================================================================== --- base/applications/charmap/lang/ro-RO.rc (revision 75907) +++ base/applications/charmap/lang/ro-RO.rc (working copy) @@ -8,10 +8,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "F&ont:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "&Manual…", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/ru-RU.rc =================================================================== --- base/applications/charmap/lang/ru-RU.rc (revision 75907) +++ base/applications/charmap/lang/ru-RU.rc (working copy) @@ -4,10 +4,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "&Шрифт:", IDC_STATIC, 6, 7, 27, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "&Справка", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/sk-SK.rc =================================================================== --- base/applications/charmap/lang/sk-SK.rc (revision 75907) +++ base/applications/charmap/lang/sk-SK.rc (working copy) @@ -11,10 +11,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Pís&mo:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "&Pomocník", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/sq-AL.rc =================================================================== --- base/applications/charmap/lang/sq-AL.rc (revision 75907) +++ base/applications/charmap/lang/sq-AL.rc (working copy) @@ -6,10 +6,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Font:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Ndihmë", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/sv-SE.rc =================================================================== --- base/applications/charmap/lang/sv-SE.rc (revision 75907) +++ base/applications/charmap/lang/sv-SE.rc (working copy) @@ -9,10 +9,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 293, 205 //233 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Typsnitt:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Hjälp", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/tr-TR.rc =================================================================== --- base/applications/charmap/lang/tr-TR.rc (revision 75907) +++ base/applications/charmap/lang/tr-TR.rc (working copy) @@ -4,10 +4,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Yazı Tipi:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Yardım", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/uk-UA.rc =================================================================== --- base/applications/charmap/lang/uk-UA.rc (revision 75907) +++ base/applications/charmap/lang/uk-UA.rc (working copy) @@ -10,10 +10,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 8, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "Шрифт :", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "Довідка", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/zh-CN.rc =================================================================== --- base/applications/charmap/lang/zh-CN.rc (revision 75907) +++ base/applications/charmap/lang/zh-CN.rc (working copy) @@ -10,10 +10,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 9, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "字体:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "说明", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lang/zh-TW.rc =================================================================== --- base/applications/charmap/lang/zh-TW.rc (revision 75907) +++ base/applications/charmap/lang/zh-TW.rc (working copy) @@ -10,10 +10,10 @@ IDD_CHARMAP DIALOGEX 6, 6, 292, 224 FONT 9, "MS Shell Dlg", 0, 0 -STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE +STYLE DS_SHELLFONT | WS_CHILD | WS_VISIBLE | DS_CONTROL BEGIN LTEXT "字體:", IDC_STATIC, 6, 7, 24, 9 - COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | + COMBOBOX IDC_FONTCOMBO, 36, 5, 210, 210, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_SORT | CBS_HASSTRINGS PUSHBUTTON "說明", IDC_CMHELP, 249, 5, 35, 13 CONTROL "", IDC_FONTMAP, "FontMapWnd", WS_CHILD | WS_VISIBLE | WS_TABSTOP | Index: base/applications/charmap/lrgcell.c =================================================================== --- base/applications/charmap/lrgcell.c (revision 75907) +++ base/applications/charmap/lrgcell.c (working copy) @@ -4,7 +4,7 @@ * FILE: base/applications/charmap/lrgcell.c * PURPOSE: large cell window implementation * COPYRIGHT: Copyright 2007 Ged Murphy - * + * Copyright 2017 Katayama Hirofumi MZ */ #include "precomp.h" @@ -121,12 +121,6 @@ hdc = BeginPaint(hwnd, &ps); - Rectangle(hdc, - 0, - 0, - cxClient, - cyClient); - hOldFont = SelectObject(hdc, hFont); DrawTextW(hdc, @@ -137,6 +131,14 @@ SelectObject(hdc, hOldFont); + SelectObject(hdc, GetStockObject(NULL_BRUSH)); + SelectObject(hdc, GetStockObject(BLACK_PEN)); + Rectangle(hdc, + 0, + 0, + cxClient, + cyClient); + EndPaint(hwnd, &ps); Index: base/applications/charmap/map.c =================================================================== --- base/applications/charmap/map.c (revision 75907) +++ base/applications/charmap/map.c (working copy) @@ -4,7 +4,7 @@ * FILE: base/applications/charmap/map.c * PURPOSE: class implementation for painting glyph region * COPYRIGHT: Copyright 2007 Ged Murphy - * + * Copyright 2017 Katayama Hirofumi MZ */ #include "precomp.h" @@ -16,7 +16,61 @@ #define MAX_ROWS (0xFFFF / XCELLS) + 1 - YCELLS +static BOOL +InCellRange(PMAP infoPtr, INT x, INT y) +{ + INT index; + if (x < 0 || XCELLS <= x) + return FALSE; + + y += infoPtr->iYStart; + if (y < 0) + return FALSE; + + index = y * XCELLS + x; + if (index >= infoPtr->NumValidGlyphs) + return FALSE; + + return TRUE; +} + +static BOOL +FixCellPos(PMAP infoPtr) +{ + INT x, y, y0, index; + + x = infoPtr->iColumn; + y = infoPtr->iRow; + + if (x < 0) + x = 0; + + if (x >= XCELLS) + x = XCELLS - 1; + + y0 = y + infoPtr->iYStart; + if (y0 < 0) + y += infoPtr->iYStart; + + index = y0 * XCELLS + x; + if (index >= infoPtr->NumValidGlyphs) + { + index = infoPtr->NumValidGlyphs - 1; + x = index % XCELLS; + y0 = index / XCELLS; + y = y0 - infoPtr->iYStart; + } + + if (x != infoPtr->iColumn || y != infoPtr->iRow) + { + infoPtr->iColumn = x; + infoPtr->iRow = y; + return TRUE; + } + return FALSE; +} + static VOID SetGrid(PMAP infoPtr) @@ -23,7 +77,7 @@ { INT x, y; - for (y = 0; y < YCELLS; y++) + for (y = -1; y < YCELLS + 1; y++) for (x = 0; x < XCELLS; x++) { infoPtr->Cells[y][x].CellExt.left = x * infoPtr->CellSize.cx + 1; @@ -50,7 +104,6 @@ infoPtr->pActiveCell->CellInt.top, infoPtr->pActiveCell->CellInt.right, infoPtr->pActiveCell->CellInt.bottom); - } @@ -63,9 +116,12 @@ RECT rc; PCELL Cell; - for (y = 0; y < YCELLS; y++) + for (y = -1; y < YCELLS + 1; y++) for (x = 0; x < XCELLS; x++) { + if (!InCellRange(infoPtr, x, y)) + continue; + Cell = &infoPtr->Cells[y][x]; if (!IntersectRect(&rc, @@ -101,16 +157,24 @@ PCELL Cell; INT i, added; + SetBkMode(ps->hdc, TRANSPARENT); + hOldFont = SelectObject(ps->hdc, infoPtr->hFont); - i = XCELLS * infoPtr->iYStart; + i = XCELLS * (infoPtr->iYStart - 1); added = 0; - for (y = 0; y < YCELLS; y++) + for (y = -1; y < YCELLS + 1; y++) for (x = 0; x < XCELLS; x++) { + if (!InCellRange(infoPtr, x, y)) + { + ++i; + continue; + } + ch = (WCHAR)infoPtr->ValidGlyphs[i]; Cell = &infoPtr->Cells[y][x]; @@ -121,6 +185,11 @@ { Cell->ch = ch; + if (Cell->bActive) + { + InflateRect(&rc, -1, -1); + } + DrawTextW(ps->hdc, &ch, 1, @@ -215,6 +284,8 @@ WCHAR ch[MAX_GLYPHS]; WORD out[MAX_GLYPHS]; DWORD i, j; + INT nMaxPos; + SCROLLINFO si; /* Destroy Zoom window, since it was created with older font */ DestroyWindow(infoPtr->hLrgWnd); @@ -240,7 +311,13 @@ NULL, TRUE); + ZeroMemory(&infoPtr->ValidGlyphs, sizeof(infoPtr->ValidGlyphs)); + ZeroMemory(&infoPtr->AllCells, sizeof(infoPtr->AllCells)); + SetGrid(infoPtr); + infoPtr->pActiveCell = &infoPtr->Cells[0][0]; + infoPtr->iColumn = 0; + infoPtr->iRow = 0; // Get all the valid glyphs in this font @@ -249,6 +326,7 @@ for (i = 0; i < MAX_GLYPHS; i++) ch[i] = (WCHAR)i; + FillMemory(&out, sizeof(out), 0xFF); if (GetGlyphIndicesW(hdc, ch, MAX_GLYPHS, @@ -269,17 +347,42 @@ ReleaseDC(infoPtr->hMapWnd, hdc); - infoPtr->NumRows = infoPtr->NumValidGlyphs / XCELLS; - if (infoPtr->NumValidGlyphs % XCELLS) - infoPtr->NumRows += 1; - infoPtr->NumRows = (infoPtr->NumRows > YCELLS) ? infoPtr->NumRows - YCELLS : 0; + infoPtr->NumRows = (infoPtr->NumValidGlyphs + XCELLS - 1) / XCELLS; - SetScrollRange(infoPtr->hMapWnd, SB_VERT, 0, infoPtr->NumRows, FALSE); - SetScrollPos(infoPtr->hMapWnd, SB_VERT, 0, TRUE); + if (infoPtr->NumRows > YCELLS) + { + nMaxPos = infoPtr->NumRows - YCELLS; + } + else + { + nMaxPos = 0; + } + + ZeroMemory(&si, sizeof(si)); + si.cbSize = sizeof(si); + si.fMask = SIF_ALL | SIF_DISABLENOSCROLL; + si.nMin = 0; + si.nMax = nMaxPos; + si.nPos = 0; + + if (nMaxPos == 0) + { + si.nPage = 1; + SetScrollInfo(infoPtr->hMapWnd, SB_VERT, &si, TRUE); + EnableScrollBar(infoPtr->hMapWnd, SB_VERT, ESB_DISABLE_BOTH); + } + else + { + si.nPage = 0; + SetScrollInfo(infoPtr->hMapWnd, SB_VERT, &si, TRUE); + EnableScrollBar(infoPtr->hMapWnd, SB_VERT, ESB_ENABLE_BOTH); + } + infoPtr->iYStart = 0; + infoPtr->iColumn = 0; + infoPtr->iRow = 0; } - static LRESULT NotifyParentOfSelection(PMAP infoPtr, @@ -305,7 +408,54 @@ return Ret; } +static +VOID +SelectActiveCell(PMAP infoPtr, INT x, INT y) +{ + // y are relative against infoPtr->iYStart + if (!InCellRange(infoPtr, x, y)) + return; + + if (y < 0) + { + y = 0; + SendMessage(infoPtr->hMapWnd, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0); + } + else if (y >= YCELLS) + { + y = YCELLS - 1; + SendMessage(infoPtr->hMapWnd, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, y), 0); + } + + /* set previous active cell to inactive */ + if (infoPtr->pActiveCell) + { + /* invalidate normal cells, required when + * moving a small active cell via keyboard */ + if (!infoPtr->pActiveCell->bLarge) + { + InvalidateRect(infoPtr->hMapWnd, + &infoPtr->pActiveCell->CellInt, + TRUE); + } + + infoPtr->pActiveCell->bActive = FALSE; + infoPtr->pActiveCell->bLarge = FALSE; + } + + /* set new cell to active */ + infoPtr->pActiveCell = &infoPtr->Cells[y][x]; + infoPtr->iColumn = x; + infoPtr->iRow = y; + infoPtr->pActiveCell->bActive = TRUE; + infoPtr->pActiveCell->bLarge = TRUE; + if (infoPtr->hLrgWnd) + MoveLargeCell(infoPtr); + else + CreateLargeCell(infoPtr); +} + static VOID OnClick(PMAP infoPtr, @@ -319,8 +469,11 @@ pt.y = pty; for (x = 0; x < XCELLS; x++) - for (y = 0; y < YCELLS; y++) + for (y = -1; y < YCELLS + 1; y++) { + if (!InCellRange(infoPtr, x, y)) + continue; + if (PtInRect(&infoPtr->Cells[y][x].CellInt, pt)) { @@ -327,30 +480,7 @@ /* if the cell is not already active */ if (!infoPtr->Cells[y][x].bActive) { - /* set previous active cell to inactive */ - if (infoPtr->pActiveCell) - { - /* invalidate normal cells, required when - * moving a small active cell via keyboard */ - if (!infoPtr->pActiveCell->bLarge) - { - InvalidateRect(infoPtr->hMapWnd, - &infoPtr->pActiveCell->CellInt, - TRUE); - } - - infoPtr->pActiveCell->bActive = FALSE; - infoPtr->pActiveCell->bLarge = FALSE; - } - - /* set new cell to active */ - infoPtr->pActiveCell = &infoPtr->Cells[y][x]; - infoPtr->pActiveCell->bActive = TRUE; - infoPtr->pActiveCell->bLarge = TRUE; - if (infoPtr->hLrgWnd) - MoveLargeCell(infoPtr); - else - CreateLargeCell(infoPtr); + SelectActiveCell(infoPtr, x, y); } else { @@ -371,6 +501,8 @@ break; } } + + SetFocus(infoPtr->hMapWnd); } @@ -383,6 +515,8 @@ RECT rc; BOOL Ret = FALSE; + ShowScrollBar(hwnd, SB_HORZ, FALSE); + infoPtr = HeapAlloc(GetProcessHeap(), 0, sizeof(MAP)); @@ -410,8 +544,6 @@ SetGrid(infoPtr); - SetScrollPos(infoPtr->hParent, SB_VERT, 0, TRUE); - Ret = TRUE; } } @@ -427,7 +559,10 @@ INT Pos) { INT iYDiff, iOldYStart = infoPtr->iYStart; + INT nMinPos, nMaxPos; + GetScrollRange(infoPtr->hMapWnd, SB_VERT, &nMinPos, &nMaxPos); + switch (Value) { case SB_LINEUP: @@ -450,13 +585,23 @@ infoPtr->iYStart = Pos; break; - default: + case SB_TOP: + infoPtr->iYStart = nMinPos; break; - } - infoPtr->iYStart = max(0, infoPtr->iYStart); - infoPtr->iYStart = min(infoPtr->iYStart, infoPtr->NumRows); + case SB_BOTTOM: + infoPtr->iYStart = nMaxPos; + break; + default: + break; + } + + if (infoPtr->iYStart < nMinPos) + infoPtr->iYStart = nMinPos; + if (infoPtr->iYStart > nMaxPos) + infoPtr->iYStart = nMaxPos; + iYDiff = iOldYStart - infoPtr->iYStart; if (iYDiff) { @@ -474,8 +619,7 @@ { RECT rect; GetClientRect(infoPtr->hMapWnd, &rect); - rect.top += 2; - rect.bottom -= 2; + ScrollWindowEx(infoPtr->hMapWnd, 0, iYDiff * infoPtr->CellSize.cy, @@ -483,7 +627,14 @@ &rect, NULL, NULL, - SW_INVALIDATE); + SW_INVALIDATE | SW_ERASE); + + if (iYDiff > 0) + rect.top = rect.bottom - 2; + else + rect.bottom = rect.top + 2; + + InvalidateRect(infoPtr->hMapWnd, &rect, TRUE); } else { @@ -496,6 +647,11 @@ { ShowWindow(infoPtr->hLrgWnd, SW_SHOW); } + + if (FixCellPos(infoPtr)) + { + SelectActiveCell(infoPtr, infoPtr->iColumn, infoPtr->iRow); + } } } @@ -508,36 +664,17 @@ PAINTSTRUCT ps; HDC hdc; - - if (wParam != 0) + hdc = BeginPaint(infoPtr->hMapWnd, &ps); + if (hdc == NULL) { - if (!GetUpdateRect(infoPtr->hMapWnd, - &ps.rcPaint, - TRUE)) - { - return; - } - ps.hdc = (HDC)wParam; + return; } - else - { - hdc = BeginPaint(infoPtr->hMapWnd, - &ps); - if (hdc == NULL) - { - return; - } - } DrawGrid(infoPtr, &ps); FillGrid(infoPtr, &ps); - if (wParam == 0) - { - EndPaint(infoPtr->hMapWnd, - &ps); - } + EndPaint(infoPtr->hMapWnd, &ps); } @@ -628,6 +765,65 @@ break; } + case WM_GETDLGCODE: + return DLGC_WANTARROWS; + + case WM_KEYDOWN: + { + switch (wParam) + { + case VK_HOME: + if (GetKeyState(VK_CONTROL) < 0) + { + SendMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_TOP, 0), 0); + SelectActiveCell(infoPtr, 0, 0); + } + else + { + SelectActiveCell(infoPtr, 0, infoPtr->iRow); + } + break; + case VK_END: + if (GetKeyState(VK_CONTROL) < 0) + { + INT y, index = infoPtr->NumValidGlyphs - 1; + + SendMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_BOTTOM, 0), 0); + + if (index / XCELLS > YCELLS) + y = YCELLS - 1; + else + y = index / XCELLS; + + SelectActiveCell(infoPtr, index % XCELLS, y); + } + else + { + SelectActiveCell(infoPtr, XCELLS - 1, infoPtr->iRow); + } + break; + case VK_LEFT: + SelectActiveCell(infoPtr, infoPtr->iColumn - 1, infoPtr->iRow); + break; + case VK_RIGHT: + SelectActiveCell(infoPtr, infoPtr->iColumn + 1, infoPtr->iRow); + break; + case VK_UP: + SelectActiveCell(infoPtr, infoPtr->iColumn, infoPtr->iRow - 1); + break; + case VK_DOWN: + SelectActiveCell(infoPtr, infoPtr->iColumn, infoPtr->iRow + 1); + break; + case VK_PRIOR: + SendMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_PAGEUP, 0), 0); + break; + case VK_NEXT: + SendMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_PAGEDOWN, 0), 0); + break; + } + break; + } + default: { Ret = DefWindowProcW(hwnd, Index: base/applications/charmap/precomp.h =================================================================== --- base/applications/charmap/precomp.h (revision 75907) +++ base/applications/charmap/precomp.h (working copy) @@ -15,7 +15,7 @@ #define MAX_GLYPHS 65536 #define XCELLS 20 -#define YCELLS 10 +#define YCELLS 11 #define XLARGE 45 #define YLARGE 25 @@ -42,7 +42,16 @@ HWND hLrgWnd; SIZE ClientSize; SIZE CellSize; - CELL Cells[YCELLS][XCELLS]; + INT iColumn; + INT iRow; + union { + struct { + CELL BeforeCells[1][XCELLS]; + CELL Cells[YCELLS][XCELLS]; + CELL AfterCells[1][XCELLS]; + }; + CELL AllCells[1 + YCELLS + 1][XCELLS]; + }; PCELL pActiveCell; HFONT hFont; LOGFONTW CurrentFont; @@ -49,9 +58,8 @@ INT iYStart; INT NumRows; - USHORT ValidGlyphs[MAX_GLYPHS]; + USHORT ValidGlyphs[MAX_GLYPHS + XCELLS]; USHORT NumValidGlyphs; - } MAP, *PMAP; typedef struct {