c++mfcribbonrecent-file-list

How to correctly refresh the ribbon's MFC default recent documents list?


How to correctly refresh the ribbon's MFC default recent documents list?

The list in not updating correclty. I enabled it using this: In the ribbon XML, inside the CATEGORY_MAIN tag i've created this

  <RECENT_FILE_LIST>
    <ENABLE>TRUE</ENABLE>
    <LABEL>Recent Documents</LABEL>
  </RECENT_FILE_LIST>

and in the ::InitInstance() of my derived CWinApp class i used

    LoadStdProfileSettings();

the problem is: When i open or save a file, the list isn't updated. But when i close and open the program it passes trought the "LoadStdProfileSettings()" and the list is updated.

thanks in advance


Solution

  • Solution found.

    in my derived CWinApp class, in the overwritten method AddToRecentFileList, i needed to read the recent file list again adding this at the end of the method:

    m_pRecentFileList->ReadList();