MFC修改全局字体
2014-06-19 10:02
211 查看
BOOL CXXXApp::InitInstance() 中加入如下代码:
#include<AfxGlobals.h>
//设置正常字体 LOGFONT lf; afxGlobalData.fontRegular.GetLogFont(&lf); afxGlobalData.fontRegular.DeleteObject(); lf.lfHeight = -12; lstrcpy(lf.lfFaceName, _T("宋体")); afxGlobalData.fontRegular.CreateFontIndirect(&lf); //设置加粗的字体 afxGlobalData.fontBold.GetLogFont(&lf); afxGlobalData.fontBold.DeleteObject(); lf.lfHeight = -12; lstrcpy(lf.lfFaceName, _T("宋体")); afxGlobalData.fontBold.CreateFontIndirect(&lf); afxGlobalData.fontTooltip.GetLogFont(&lf); afxGlobalData.fontTooltip.DeleteObject(); lf.lfHeight = -12; lstrcpy(lf.lfFaceName, _T("宋体")); afxGlobalData.fontTooltip.CreateFontIndirect(&lf);
相关文章推荐
- MFC字体大小修改
- MFC怎么修改静态文本的字体大小
- android开发之修改全局自定义字体
- Android 全局修改字体
- 关于MFC中修改控件字体和背景颜色的方法
- MFC中修改静态文本框中文字的字体、颜色
- MFC Cbutton、Cstatic、Edit/控件修改字体及颜色
- MFC 笔记 申请设备子类 加入图片 自定义字体 修改窗口标题
- iOS运用runtime全局修改UILabel的默认字体
- 信息: 更正 SetFont() 函数,在 MFC 的使用 修改字体
- 大批量修改MFC所有控件字体
- MFC字体大小修改
- 对于修改TabBar和NavigationBar全局背景颜色、字体颜色的两个方法
- MFC对话框修改背景颜色或添加背景图片、控件背景与字体颜色的修改
- VC MFC中修改STATIC的文本颜色和文本字体等
- 运用Runtime全局修改UILabel的默认字体
- 通过修改 LayoutInflater,全局替换字体!!!
- VC 2010+MFC:CMFCToolBar和CMFCMenuBar的字体大小修改
- MFC修改按钮中字体颜色大小
- iOS运用runtime全局修改UILabel的默认字体