一个很菜的问题?

lzn1 2003-10-09 03:12:08
如何设置对话诓中的static text的字体为宋体,字号为5号字??
...全文
38 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yintongshun 2003-10-09
  • 打赏
  • 举报
回复
属性
wanderman 2003-10-09
  • 打赏
  • 举报
回复
如果设置整个对话框就直接设置对话框属性就行
如果单独的edit筐需要创建字体,然后连接
定义字体
创建字体
加载字体
guankaifu 2003-10-09
  • 打赏
  • 举报
回复
对话框-右键菜单-属性.
直接设置对话框的字体为宋体,字号为5号字
.
按确定
xiaohyy 2003-10-09
  • 打赏
  • 举报
回复
CFont font;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT)); // zero out structure
lf.lfHeight = 20; // request a 12-pixel-height font
strcpy(lf.lfFaceName, "宋体"); // request a face name "Arial"
VERIFY(font.CreateFontIndirect(&lf)); // create the font

// Do something with the font just created...
CClientDC dc(this);
CFont* def_font = dc.SelectObject(&font);
dc.TextOut(5, 5, "Hello", 5);
dc.SelectObject(def_font);

// Done with the font. Delete the font object.
font.DeleteObject();
spwnihao 2003-10-09
  • 打赏
  • 举报
回复
直接设置对话框的字体为宋体,字号为5号字
对话框-右键菜单-属性

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧