diff --git a/reactos/base/applications/charmap/charmap.c b/reactos/base/applications/charmap/charmap.c index 0fc2fd068ef..25d922cb36f 100644 --- a/reactos/base/applications/charmap/charmap.c +++ b/reactos/base/applications/charmap/charmap.c @@ -34,6 +34,9 @@ EnumFontNames(ENUMLOGFONTEXW *lpelfe, HWND hwndCombo = (HWND)lParam; LPWSTR pszName = lpelfe->elfLogFont.lfFaceName; + /* Skip rotated font */ + if(pszName[0] == L'@') return 1; + /* make sure font doesn't already exist in our list */ if(SendMessageW(hwndCombo, CB_FINDSTRINGEXACT, @@ -321,7 +324,7 @@ CharMapDlgProc(HWND 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 |= ENM_CHANGE; SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_SETEVENTMASK, 0, (LPARAM)evMask); diff --git a/reactos/base/applications/charmap/lrgcell.c b/reactos/base/applications/charmap/lrgcell.c index fe086b2e50b..db68df6992b 100644 --- a/reactos/base/applications/charmap/lrgcell.c +++ b/reactos/base/applications/charmap/lrgcell.c @@ -35,7 +35,7 @@ SetLrgFont(PMAP infoPtr) { SendMessageW(hCombo, WM_GETTEXT, - 31, + Len + 1, (LPARAM)lpFontName); ZeroMemory(&lf, diff --git a/reactos/base/applications/charmap/map.c b/reactos/base/applications/charmap/map.c index cd8ee8e4b88..b47dab36c40 100644 --- a/reactos/base/applications/charmap/map.c +++ b/reactos/base/applications/charmap/map.c @@ -14,6 +14,8 @@ static const WCHAR szMapWndClass[] = L"FontMapWnd"; static const WCHAR szLrgCellWndClass[] = L"LrgCellWnd"; +#define MAX_ROWS (0xFFFF / XCELLS) + 1 - YCELLS + static VOID TagFontToCell(PCELL pCell, @@ -377,7 +379,7 @@ OnCreate(PMAP infoPtr, SetGrid(infoPtr); - SetScrollRange(hwnd, SB_VERT, 0, 255, FALSE); + SetScrollRange(hwnd, SB_VERT, 0, MAX_ROWS, FALSE); SetScrollPos(hwnd, SB_VERT, 0, TRUE); Ret = TRUE; @@ -423,7 +425,7 @@ OnVScroll(PMAP infoPtr, } infoPtr->iYStart = max(0, - min(infoPtr->iYStart, 255*16)); + min(infoPtr->iYStart, MAX_ROWS)); iYDiff = iOldYStart - infoPtr->iYStart; if (iYDiff)