我正在尝试构建一个欢迎页面(基于 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 ];
}
关于c++ - MFC中获取最近文件列表的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29749788/