if (!CreateFontComboBox())
return FALSE;
+ ChangeMapFont();
+
// Configure Richedit control for sending notification changes.
DWORD evMask;
evMask = SendDlgItemMessage(hDlg, IDC_TEXTBOX, EM_GETEVENTMASK, 0, 0);
case IDC_CHECK_ADVANCED:
break;
+ case IDC_FONTCOMBO:
+ if (HIWORD(wParam) == CBN_SELCHANGE)
+ {
+ ChangeMapFont();
+ }
+ break;
+
default:
// We didn't handle it
RetCode = -1;
0);
return (ret == 1);
-}
\ No newline at end of file
+}
+
+bool
+CCharMapWindow::ChangeMapFont(
+ )
+{
+ HWND hCombo;
+ hCombo = GetDlgItem(m_hMainWnd, IDC_FONTCOMBO);
+
+ INT Length;
+ Length = GetWindowTextLengthW(hCombo);
+ if (!Length) return false;
+
+ CAtlStringW FontName;// = L"hahaha";
+ FontName.Preallocate(Length);
+
+ SendMessageW(hCombo,
+ WM_GETTEXT,
+ FontName.GetAllocLength(),
+ (LPARAM)FontName.GetBuffer());
+
+ return m_GridView->SetFont(FontName);
+}