
How to change the font size for a CEdit control
I am using a CFormView and on it I have a CEdit control. I
want to change the size of the font for the control.
In the OnInitialUpdate() of the CFormView, I am trying a
number of various ways to set the Font Size, but I seem to
be misunderstanding something.
void MyForm::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT)); // clear
out structure.
lf.lfHeight = 720; // request
a 72-pixel-height font
strcpy(lf.lfFaceName, "Arial"); // request
a face name "Arial".
CFont font;
font.CreatePointFontIndirect(&lf);
m_equation.SetFont(&font);
m_equation.SetWindowText("12x12");
Quote:
}
If I go to edit in the control, I get an insertion point
which seems to be 72 points high, but the text in the
control always remains at the 12 point size.
Any ideas?
Sincerely,
Lindsay