vc++常用技巧总结_(孙鑫视频总结).docxVIP

  • 2
  • 0
  • 约5.71万字
  • 约 74页
  • 2016-08-11 发布于重庆
  • 举报
vc常用技巧总结_(孙鑫视频总结)

Vc++常用技巧总结(1)当文档被修改时,如何在标题上加上标志*?重载CDocument类的虚函数virtual SetModifiedFlag:void CTest2Doc::SetModifiedFlag(BOOL bModified){????CString strTitle = GetTitle();????CString strDirtyFlag = *; // note space before the *????????????// so we dont break Save As dialog????if (!IsModified() bModified)????{????????SetTitle(strTitle + strDirtyFlag);????}????else if ( IsModified() !bModified )????{????????int nTitleLength = strTitle.GetLength();????????int nDirtyLength = strDirtyFlag.GetLength();????????SetTitle( strTitle.Left(nTitleLength - nDirtyLength) );????}????UpdateFrameCounts();????CDocument::SetMo

文档评论(0)

1亿VIP精品文档

相关文档