如何正确刷新Ribbon的MFC默认最近文档列表?
如何正确刷新ribbon的MFC默认最近文档列表?
该列表未正确更新。 我使用这个启用它: 在功能区 XML 中,我在 CATEGORY_MAIN 标记内创建了此内容
<RECENT_FILE_LIST>
<ENABLE>TRUE</ENABLE>
<LABEL>Recent Documents</LABEL>
</RECENT_FILE_LIST>
,并在我的派生 CWinApp 类的 ::InitInstance() 中使用了
LoadStdProfileSettings();
问题是:当我打开或保存文件时,列表不会更新。但是当我关闭并打开程序时,它会通过“LoadStdProfileSettings()”并更新列表。
提前致谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到解决方案。
在我的派生 CWinApp 类中,在覆盖的方法 AddToRecentFileList 中,我需要再次读取最近的文件列表,在方法末尾添加以下内容:
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: