📄 index055.htm
字号:
<html>
<style type="text/css"><!--
.p9 { font-family: "宋体"; font-size: 9pt}a {text-transform: none; text-decoration: none;}
a:hover {text-decoration: underline; color: #FF0000;}
--></style>
<body background="../di2001.jpg">
<h3 align="center"><font COLOR="#AOAO99"></font></h3>
<table width="100%" border="1" cellspacing="1">
<tr><td><p align="center"><font color="#FF0000">如何正确显示包含标签字符的串</font></td></tr>
<tr><td><p>
</Br>
调用GDI文本绘画函数时需要展开标签字符,这可以通过调用CDC:: TabbedTextOut或者CDC:: DrawText并指定DT_EXPANDTABS标志来完成。TabbedTextOut函数允许指定标签位的数组,下例指定每20设备单位展开一个标签:<Br>
</Br>
void CSampleView:: OnDraw (CDC* pDC)<Br>
{<Br>
CTestDoc* pDoc=GetDocument ()<Br>
ASSERT_VALID (pDoC)<Br>
</Br>
CString str<Br>
str.Format (_T ("Cathy\tNorman\tOliver"))<Br>
int nTabStop=20 //tabs are every 20 pixels<Br>
pDC->TabbedtextOut (10, 10, str, 1, &nTabStop, 10)<Br>
}<Br>
</Br>
</p></td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -