2012-03-29 17 views
5

Wie die "font" für das folgende einstellen: (gelöst)Wie ändert man die "FONT" für CEdit?

fontSize 40 
BOLD 
Italicized 

Dank


Die folgende versagt: (funktioniert jetzt) ​​

CFont *myFont = new CFont(); 
myFont->CreateFont(40, 0, 0, 0, FW_HEAVY, true, false, 
     0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 
     FIXED_PITCH|FF_MODERN, _T("Courier New")); 

CEdit *ed1 = new CEdit(); 
ed1->Create(WS_VISIBLE | WS_BORDER,CRect(200,100,500,140),this,16); 
ed1->SetFont(myFont); 

Antwort

5

Achten Sie darauf, nicht zu delete myFont solange das Bearbeitungssteuerelement noch vorhanden ist.

Verwandte Themen