jaeathome.blogg.se

Mfc edit control getwindowtext
Mfc edit control getwindowtext





Otherwise font object should decalre as a member or a global object.Ĭomments : 1 Comment » Tags: better usability, CreateFont, How do I change the font of a control, How to change the default font of a control, SetFont Categories : Controls, MFC, VC++ Then we can set that font to any controls using CWnd’s SetFont function.ĬWnd* pCtrlWnd = GetDlgItem(IDC_ST_TEST_CONTROL) įont can be created in many ways, but the only important thing is font object should exist as long as the control exist. Sometimes we may need to change this for a better visibility or some other usability requirements.īefore setting a font to a control, we have to create a CFont object with desired size and other parameters using CreateFont function. Each windows controls(Static Text, Edit, Button etc) have its own default fonts.







Mfc edit control getwindowtext