How to Change the Font Dynamically on button control
-
hi, I am developing SDI application ,inherits from FomView. It is required that i have to use TTF font type(which i downloaded from Ineternet) on button in run time. Thank u....
-
hi, I am developing SDI application ,inherits from FomView. It is required that i have to use TTF font type(which i downloaded from Ineternet) on button in run time. Thank u....
You can use of CFont::Create and use of SetFont.
-
hi, I am developing SDI application ,inherits from FomView. It is required that i have to use TTF font type(which i downloaded from Ineternet) on button in run time. Thank u....
Mira wey, necesitas poner: CMyView : public CFormView{ CFont fontButton; // }; CMyView::OnInitialUpdate(){ LOGFONT lf; memset(&lf,0,sizeof(lf)); lf.lfHeight=(int)(33); lf.lfWeight=FW_BOLD; strcpy(lf.lfFaceName,"Arial"); m_fontButton.CreateFontIndirect(&lf); GetDlgItem(IDC_MYBUTTON)->SetFont(&fontButton); }
-
Mira wey, necesitas poner: CMyView : public CFormView{ CFont fontButton; // }; CMyView::OnInitialUpdate(){ LOGFONT lf; memset(&lf,0,sizeof(lf)); lf.lfHeight=(int)(33); lf.lfWeight=FW_BOLD; strcpy(lf.lfFaceName,"Arial"); m_fontButton.CreateFontIndirect(&lf); GetDlgItem(IDC_MYBUTTON)->SetFont(&fontButton); }
hi.. Thanks for Reply.. But when i try to do the same but "AkruthiDev1"(ttf font for Hindi)inplace of "Arial".. the code doesn't work.. In some aticle ,they mention that we have to use EnumFontProc() callback function. Can u please tell me ,how to use that function.
-
hi.. Thanks for Reply.. But when i try to do the same but "AkruthiDev1"(ttf font for Hindi)inplace of "Arial".. the code doesn't work.. In some aticle ,they mention that we have to use EnumFontProc() callback function. Can u please tell me ,how to use that function.