我要设置一个tab页的标签的字体,代码如下
CFont* pFont = GetFont();
pFont->CreateFont( -20, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0, _T("宋体") );m_myTabCtrl.SetFont(pFont);
请问下,我这样设置字体的大小对吗?谢谢回答。我的能修改成功,但是报错,不过可以忽略,错误如下
debug assertion failed!
file:wingdi.cpp
line:1120
for information on how your program can cause an assertion
failure ,see the visual C++ documentation on asserts.
(press retry to debug the application)
谢谢回答
CFont* pFont = GetFont();
pFont->CreateFont( -20, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0, _T("宋体") );m_myTabCtrl.SetFont(pFont);
请问下,我这样设置字体的大小对吗?谢谢回答。我的能修改成功,但是报错,不过可以忽略,错误如下
debug assertion failed!
file:wingdi.cpp
line:1120
for information on how your program can cause an assertion
failure ,see the visual C++ documentation on asserts.
(press retry to debug the application)
谢谢回答
解决方案 »
- Win32 DLL 使用 RegisterDeviceNotification() 无法注册
- 帮我看看获取串口数据问题出在哪儿~~~~~~
- 简述对Traints概念的理解
- error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
- 求助!CMSFlexGrid的RELEASE问题.
- 求救!!!!!!!!!
- 如何把 MSDN 和 VC 连起来?
- 太恶心了,看到贴近身照的就想抽Y耳光
- 关于动态库问题中调用主程序函数的问题
- 谁能告诉我这里的"&"代表什么意思?
- 想开发个网页表单提交程序,比如说,不用打开网页,也能在网上发贴的程序
- BCMenu的问题。
pFont->CreateFont( -20, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0, _T("宋体") ); m_myTabCtrl.SetFont(pFont); pFont->DeleteObject();
delete pFont
这样试试!
pFont->CreateFont(
-20, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_NORMAL, // nWeight
FALSE, // bItalic
FALSE, // bUnderline
0, // cStrikeOut
GB2312_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
_T("宋体"))); // lpszFacename
pFont->CreateFont( -20, 0, 0, 0, 700, 0, 0, 0, 0, 0, 0, 0, 0, _T("宋体") );
m_myTabCtrl.SetFont(pFont);