enrecentfilelist.cpp
来自「管理项目进度工具的原代码」· C++ 代码 · 共 55 行
CPP
55 行
// EnRecentFileList.cpp: implementation of the CEnRecentFileList class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "EnRecentFileList.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CEnRecentFileList::CEnRecentFileList(UINT nStart, LPCTSTR lpszSection,
LPCTSTR lpszEntryFormat, int nSize, int nMaxDispLen, LPCTSTR szOriginal)
: CRecentFileList(nStart, lpszSection, lpszEntryFormat, nSize, nMaxDispLen)
{
m_strOriginal = szOriginal;
}
CEnRecentFileList::~CEnRecentFileList()
{
}
void CEnRecentFileList::UpdateMenu(CCmdUI* pCmdUI)
{
if (m_arrNames[0].IsEmpty())
{
if (pCmdUI->m_pMenu == NULL)
return;
// delete all but the first item
for (int iMRU = 1; iMRU < m_nSize; iMRU++)
pCmdUI->m_pMenu->DeleteMenu(pCmdUI->m_nID + iMRU, MF_BYCOMMAND);
}
CRecentFileList::UpdateMenu(pCmdUI);
}
void CEnRecentFileList::RemoveAll(BOOL bClearProfile)
{
int nItem = GetSize();
while (nItem--)
Remove(nItem);
if (bClearProfile)
WriteList();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?