3

I am trying to build a welcome page (which is CDHTmlDialog based) and in that welcome page i want to present a list of my recent files. it should look like Adobe Reader welcome page.

I tried to get the recent file list by getting the MRU list and it's not going so well.

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();

1 Answers1

3

The list of recent files in MFC is maintained in CRecentFileList* CWinApp::m_pRecentFileList. You can access it by index like this:

CString CMyApp::GetRecentFile( int index ) const  
{  
    return (*m_pRecentFileList)[ index ];  
} 
Andrew Komiagin
  • 6,446
  • 1
  • 13
  • 23