MFC: Most recently used (MRU) files
-
Microsoft Visual C++ 2019. Windows 10, using MFC Is there a nice step by step example of code showing how to use the MRU in a standard SDI application with ribbon and without document/view architecture? My used files (*.jpg, *.bmp) are well stored in the MRU file list of the main menu of the ribbon. But when I click on one of them I have an error in .../MFC/appui.cpp showing that ENSURE_VALID(m_pDocManager) failed, which is normal because I did not choose doc/view support. Is there any way out, unless completely rewriting a new project with pDocManager? Pierre
-
Microsoft Visual C++ 2019. Windows 10, using MFC Is there a nice step by step example of code showing how to use the MRU in a standard SDI application with ribbon and without document/view architecture? My used files (*.jpg, *.bmp) are well stored in the MRU file list of the main menu of the ribbon. But when I click on one of them I have an error in .../MFC/appui.cpp showing that ENSURE_VALID(m_pDocManager) failed, which is normal because I did not choose doc/view support. Is there any way out, unless completely rewriting a new project with pDocManager? Pierre
You should handle the commands opening the files from MRU list in your own CWinApp derived class. Here you could then open the files without using pDocManager. See the example in [Q243751: HOWTO: Add Command Handlers for MRU Menu Items in MFC App | KnowledgeBase Archive](https://jeffpar.github.io/kbarchive/kb/243/Q243751/)
-
You should handle the commands opening the files from MRU list in your own CWinApp derived class. Here you could then open the files without using pDocManager. See the example in [Q243751: HOWTO: Add Command Handlers for MRU Menu Items in MFC App | KnowledgeBase Archive](https://jeffpar.github.io/kbarchive/kb/243/Q243751/)
Works fine. Thanks Piere
-
Works fine. Thanks Piere
You are welcome! :) :)