I'd like the user to be able to edit the number of recent files shown in the File menu of my MFC application. I've used two very good references:
It involves deleting and recreating the CRecentFileList
object stored in CWinApp::m_pRecentFileList
. Unfortunately, I find that the menu is not updated properly after replacing the CRecentFileList
. See code snippet below:
void CMyWinApp::SetMRUListSize( int size )
{
// size guaranteed to be between 1 and 16
delete m_pRecentFileList ;
LoadStdProfileSettings( size ) ;
}
What can I do to ensure that what is drawn into the File menu is synchronized with m_pRecentFileList
after I recreate the object?