⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index056.htm

📁 关于vc的一本问题集,很不错的,有很多精采的问题
💻 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="../../../backg.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>
调用CDC:: DrawText并指定DT_END_ELLIPSIS标志,这样就可以用小略号取代串末尾的字符使其适合于指定的边界矩形。如果要显示路径信息,指定DT_END_ELLIPSIS标志并省略号取代串中间的字符。<Br>
</Br>
void CSampleView:: OnDraw (CDC* pDC)<Br>
{<Br>
&nbsp;CTestDoc* pDoc=GetDocument ()<Br>
&nbsp;ASSERT_VALID (pDoc)<Br>
</Br>
&nbsp;//Add ellpsis to end of string if it does not fit<Br>
&nbsp;pDC->Drawtext (CString ("This is a long string"), CRect (10, 10, 80, 30), DT_LEFT | DT_END_ELLIPSIS)<Br>
</Br>
&nbsp;//Add ellpsis to middle of string if it does not fit<Br>
&nbsp;pDC->DrawText (AfxgetApp () ->m_pszhelpfilePath, CRect (10, 40, 200, 60), DT_LEFT | DT_PATH_ELLIPSIS)<Br>
}<Br>
</Br>
</p></td></tr>
</table><p align="center"><img src="../../../logo.gif" align="center"><center><table><tr><td><a href="http://www.ourcode.net" target=_top>www.OurCode.net</a><Br>版权所有: 2002-2008</a></td></tr></table></center></p>
</body><SCRIPT LANGUAGE='JavaScript' SRC='../../../navigate_bar.js'></SCRIPT><SCRIPT LANGUAGE='JavaScript'>write_tail();</SCRIPT></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -