如何在 MFC 中获取最近文件的列表
How to get a list of recent files in MFC
我正在尝试构建一个欢迎页面(基于CDHTmlDialog),在该欢迎页面中,我想显示我最近的文件列表。它应该看起来像Adobe Reader欢迎页面。
我试图通过获取 MRU 列表来获取最近的文件列表,但它进展不顺利。
LoadStdProfileSettings(5); // Load standard INI file options (including MRU)
m_pRecentUrls = new CRecentFileList('0', L"Recent URL List", L"%d", 5, URL_MRU_ENTRY_LEN);
m_pRecentUrls->ReadList();
MFC 中最近使用的文件列表在 CRecentFileList* CWinApp::m_pRecentFileList
中维护。您可以通过索引访问它,如下所示:
CString CMyApp::GetRecentFile( int index ) const
{
return (*m_pRecentFileList)[ index ];
}
相关文章:
- .cpp和.h文件中的模板专用化声明
- 为什么两个不同的未命名名称空间可以共存于一个cpp文件中
- 文本文件中的单词链表
- CMake-按正确顺序将项目与C运行时对象文件链接
- 使用新行和不使用新行读取文件
- 在C++程序中输入的文本文件将不起作用,除非文本被复制和粘贴
- 挂起和取消挂起一个文件DLL
- 如何确定我已使用非编码文件到达 EOF?
- 命名空间中具有.h和.cpp文件的类
- 如何使用ndk-build.cmd构建Android.so文件
- 从包含m行的文件中提取n行,必要时(惰性地)重复该文件
- 读取文件并输入到矢量中
- 在C++中查找文件
- c++库的公共头文件中应该包含什么
- 用c++从输入文件中读取另一行
- C++如何获取文件最近更改的时间戳
- 如何在 MFC 中获取最近文件的列表
- 从文本文件中删除最近添加的行
- 如何在CMFCRibbonBar中更新最近文件列表
- 处理大数据网络文件的高效算法,用于计算n个最近节点