MFC中怎么更改按钮文字的大小和加粗
MFC中如何更改按钮文字的大小和加粗
对MFC的对话框中好像没有设置CAPTION的大小和是否加粗,请问如果想改的话应该怎么样改。谢谢
------解决方案--------------------
资源里是可以设置对话框字体的
------解决方案--------------------
对话框属性---->font
------解决方案--------------------
// Create a new font so we can change it later
CFont * f = GetFont();
CFont newfont;
LOGFONT lf;
if(f != NULL)
{ /* Set up duplicate font */
f->GetObject(sizeof(LOGFONT), &lf);
// change font size & bold style with lf here.
...
newfont.CreateFontIndirect(&lf);
} /* Set up duplicate font */
else
{ /* Use default font spec */
newfont.CreateStockObject(ANSI_VAR_FONT);
} /* Use default font spec */
SetFont(newfont);
newfont.Detach();
对MFC的对话框中好像没有设置CAPTION的大小和是否加粗,请问如果想改的话应该怎么样改。谢谢
------解决方案--------------------
资源里是可以设置对话框字体的
------解决方案--------------------
对话框属性---->font
------解决方案--------------------
// Create a new font so we can change it later
CFont * f = GetFont();
CFont newfont;
LOGFONT lf;
if(f != NULL)
{ /* Set up duplicate font */
f->GetObject(sizeof(LOGFONT), &lf);
// change font size & bold style with lf here.
...
newfont.CreateFontIndirect(&lf);
} /* Set up duplicate font */
else
{ /* Use default font spec */
newfont.CreateStockObject(ANSI_VAR_FONT);
} /* Use default font spec */
SetFont(newfont);
newfont.Detach();