Archived

This topic is now archived and is closed to further replies.

Changing the font used in a editbox

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to change the font used in one of my editboxes. I''ve written like this: CFont m_fntBoldComic; ZeroMemory (&lfNew, sizeof(LOGFONT)); lfNew.lfHeight = 18; lfNew.lfWeight = FW_THIN; strcpy (lfNew.lfFaceName, "Comic Sans MS"); m_fntBoldComic.CreateFontIndirect(&lfNew); m_textbox.SetFont(&m_fntBoldComic, TRUE); The font changes but not to Comic Sans MS size 18 but a system bold font. What''s wrong?

Share this post


Link to post
Share on other sites
Try setting the charset - lfCharSet = DEFAULT_CHARSET; - and leaving the height and weight to default (0). Then add those items back one at a time checking each change to identify the source of the problem.

Share this post


Link to post
Share on other sites