I am new to this vc++. I want to change the font size in my edit control. Here is what I have written. It compiles and runs but does not change the font size. My project has one edit box and one button.
void CHebrewDlg::OnBnClickedNext()
{
CEdit *pCtrl = (CEdit*) GetDlgItem(IDC_EDIT1);
int static count = 0;
wchar_t hebrew_ch[30] =
{ L'א', L'בּ', L'ב', L'ג', L'ד', L'ה', L'ו', L'ז', L'ח', L'ט',
L'י', L'כּ', L'כ', L'ל', L'מ', L'נ', L'ס', L'ע', L'פּ', L'פ',
L'צ', L'ק', L'ר', L'שׁ', L'שׂ', L'ת' };
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 24;
_tcsncpy_s(lf.lfFaceName, LF_FACESIZE, _T("Arial"), 7);
CFont font1;
font1.CreateFontIndirect(&lf);
CFont* font2 = CFont::FromHandle(font1);
SendMessage((UINT)pCtrl, WM_SETFONT, (WPARAM)font2);
pCtrl->SetWindowTextW((CString)hebrew_ch[count]);
count = ++count % 26;
font1.DeleteObject();
}