index106.htm
来自「介绍了L C ö O S 2Ê 在TM S320VC5402 」· HTM 代码 · 共 39 行
HTM
39 行
<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>
重载CDocument类的虚函数virtual SetModifiedFlag:<Br>
</Br>
void CTest2Doc::SetModifiedFlag(BOOL bModified)<Br>
{<Br>
CString strTitle = GetTitle();<Br>
CString strDirtyFlag = " *"; // note space before the '*'<Br>
// so we don't break Save As dialog<Br>
</Br>
if (!IsModified() && bModified)<Br>
{<Br>
SetTitle(strTitle + strDirtyFlag);<Br>
}<Br>
else if ( IsModified() && !bModified )<Br>
{<Br>
int nTitleLength = strTitle.GetLength();<Br>
int nDirtyLength = strDirtyFlag.GetLength();<Br>
SetTitle( strTitle.Left(nTitleLength - nDirtyLength) );<Br>
}<Br>
</Br>
UpdateFrameCounts();<Br>
</Br>
CDocument::SetModifiedFlag(bModified);<Br>
}<Br>
</Br>
</p></td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?