mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 20:43:18 +00:00
[CHARMAP]
Fix the following issues: - Skip rotated font (font name starting with "@" char) - Fix a comment (misspelled "Richedit") - Fix enlarged preview font in font name is long (it truncated font name in 31 chars when copying) - Fix 2 magic values (255 here is not meaningful, and it doesn't even entirely showing Unicode Plane 0) Patch by Roy Tam. CORE-8966 #resolve #comment Thanks. Commited in r65829. svn path=/trunk/; revision=65829
This commit is contained in:
parent
51cd3cccb9
commit
373fb8c25c
3 changed files with 9 additions and 4 deletions
|
@ -34,6 +34,9 @@ EnumFontNames(ENUMLOGFONTEXW *lpelfe,
|
||||||
HWND hwndCombo = (HWND)lParam;
|
HWND hwndCombo = (HWND)lParam;
|
||||||
LPWSTR pszName = lpelfe->elfLogFont.lfFaceName;
|
LPWSTR pszName = lpelfe->elfLogFont.lfFaceName;
|
||||||
|
|
||||||
|
/* Skip rotated font */
|
||||||
|
if(pszName[0] == L'@') return 1;
|
||||||
|
|
||||||
/* make sure font doesn't already exist in our list */
|
/* make sure font doesn't already exist in our list */
|
||||||
if(SendMessageW(hwndCombo,
|
if(SendMessageW(hwndCombo,
|
||||||
CB_FINDSTRINGEXACT,
|
CB_FINDSTRINGEXACT,
|
||||||
|
@ -321,7 +324,7 @@ CharMapDlgProc(HWND hDlg,
|
||||||
|
|
||||||
ChangeMapFont(hDlg);
|
ChangeMapFont(hDlg);
|
||||||
|
|
||||||
// Configure Richedi control for sending notification changes.
|
// Configure Richedit control for sending notification changes.
|
||||||
evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
|
evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
|
||||||
evMask |= ENM_CHANGE;
|
evMask |= ENM_CHANGE;
|
||||||
SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_SETEVENTMASK, 0, (LPARAM)evMask);
|
SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_SETEVENTMASK, 0, (LPARAM)evMask);
|
||||||
|
|
|
@ -35,7 +35,7 @@ SetLrgFont(PMAP infoPtr)
|
||||||
{
|
{
|
||||||
SendMessageW(hCombo,
|
SendMessageW(hCombo,
|
||||||
WM_GETTEXT,
|
WM_GETTEXT,
|
||||||
31,
|
Len + 1,
|
||||||
(LPARAM)lpFontName);
|
(LPARAM)lpFontName);
|
||||||
|
|
||||||
ZeroMemory(&lf,
|
ZeroMemory(&lf,
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
static const WCHAR szMapWndClass[] = L"FontMapWnd";
|
static const WCHAR szMapWndClass[] = L"FontMapWnd";
|
||||||
static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd";
|
static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd";
|
||||||
|
|
||||||
|
#define MAX_ROWS (0xFFFF / XCELLS) + 1 - YCELLS
|
||||||
|
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
TagFontToCell(PCELL pCell,
|
TagFontToCell(PCELL pCell,
|
||||||
|
@ -377,7 +379,7 @@ OnCreate(PMAP infoPtr,
|
||||||
|
|
||||||
SetGrid(infoPtr);
|
SetGrid(infoPtr);
|
||||||
|
|
||||||
SetScrollRange(hwnd, SB_VERT, 0, 255, FALSE);
|
SetScrollRange(hwnd, SB_VERT, 0, MAX_ROWS, FALSE);
|
||||||
SetScrollPos(hwnd, SB_VERT, 0, TRUE);
|
SetScrollPos(hwnd, SB_VERT, 0, TRUE);
|
||||||
|
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
|
@ -423,7 +425,7 @@ OnVScroll(PMAP infoPtr,
|
||||||
}
|
}
|
||||||
|
|
||||||
infoPtr->iYStart = max(0,
|
infoPtr->iYStart = max(0,
|
||||||
min(infoPtr->iYStart, 255*16));
|
min(infoPtr->iYStart, MAX_ROWS));
|
||||||
|
|
||||||
iYDiff = iOldYStart - infoPtr->iYStart;
|
iYDiff = iOldYStart - infoPtr->iYStart;
|
||||||
if (iYDiff)
|
if (iYDiff)
|
||||||
|
|
Loading…
Reference in a new issue