怎样改变CEditView的缺省字体(100分)

S

sotn

Unregistered / Unconfirmed
GUEST, unregistred user!
我想改变CEditView的缺省字体,用SetFont,不知道为什么不起作用?
 
忘了补充一句:
庆祝大富翁Visual C++版开张!
 
int CEditViewTestView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CEditView::OnCreate(lpCreateStruct) == -1)
return -1;

// TODO: Add your specialized creation code here
//注意CFont m_Font不能是局部变量,可以添加一个成员变量。
m_Font.CreatePointFont( 200, "Comic Sans MS", NULL );
GetEditCtrl( ).SetFont(&m_Font,TRUE);
return 0;
}
 
谢谢,已经搞定了
 

Similar threads

顶部