I would like to maintain a simple recent files list on my MFC application that shows the 4 most recently used file names.
I have been playing with an example from Eugene Kain's "The MFC Answer Book" that can programmatically add strings to the Recent Files list for an application based on the standard Document/View architecture: (see "Managing the Recent Files List (MRU)") :
http://www.nerdbooks.com/isbn/0201185377
My application is a fairly lightweight utility that does not use the Document/View architecture to manage data, file formats and so on. I am not sure if the same principles used in the above example would be applicable here.
Does anyone have any examples of how they go about maintaining a recent files list that is displayed in the File menu, and can be stored in a file / registry setting somewhere? More than anything, it's my lack of knowledge and understanding that is holding me back.
Update: I have recently found this CodeProject article to be quite useful...
I recently did that using MFC, so since you seems to be using MFC as well maybe it will help:
in:
//..
//...
You only need that your application is derived from
CWinApp
(and I use a class derived fromCFrameWnd
to handle the menu, maybe you do the same?).Tell me if that works for you. Not sure if I have everything.