Kendar.org


Go to content

Change CEDitView Font

Development > MCF/C++

If you want to use your own font inside a CEditView you need to derive your own view
adding

  • in the .h file


public:
virtual void OnInitialUpdate();


  • and into the .cpp file


void CECMDView::OnInitialUpdate( )
{
CEdit &rEdit = GetEditCtrl() ;

CEditView::OnInitialUpdate();

CClientDC dc(this);
CFont* font=new CFont() ;
font->CreatePointFont ( 100,
_T("Times New Roman"),
&dc ) ;
SetFont ( font ) ;
}


Copyright E.D.R. 2005-2008 | info@kendar.org

Back to content | Back to main menu