开发者

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

开发者 https://www.devze.com 2023-04-06 21:18 出处:网络
How to correctly refresh the ribbon\'s MFC default recent documents list? The list in not updating correclty.

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 Docume开发者_如何学JAVAnts</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 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();
0

精彩评论

暂无评论...
验证码 换一张
取 消