Basically what I'm doing is giving the user the option to change the lists
size on the fly. The choose a user options button, a dialog pops up with
the MRU size field. From here they choose a number from the dropdown and I
would like to tell the application to display only that many files. Using
LoadStdProfileSettings doesn't work because the m_pRecentFileList must be
NULL and is not. This is why it can only be called from InitInstance. Does
anyone have some type of work around for this problem?
Thanks,
Todd
You can perform the required operation using CRecentFileList. If needed i
will provide you the sample code or example.
Good Luck.
Using CRecentFile
"Todd Parkin" <IHat...@Myemail.com> wrote in message
news:#eguseMG...@TK2MSFTNGP10.phx.gbl...
void TACEApp::OnUpdateFileMruFile1(CCmdUI* CmdUI)
{
// Update the Most Recent Used file list.
CRecentFileList rfl(0, "Recent File List", "File%d", 10);
int ListSize = m_UserOptions->GetMRUSize();
for (int i = 0; i < ListSize; i++)
{
if (i >= ListSize)
rfl.Remove(i);
}
rfl.UpdateMenu(CmdUI);
}
Here is the call in the message map:
ON_UPDATE_COMMAND_UI(ID_FILE_MRU_FILE1, OnUpdateFileMruFile1)
I call this from within a class that is derived from CWinApp.
I just wanted it to remove the files greater than the ListSize.
Thanks,
Todd
"Devikala Natarajan" <Devi...@speakeasy.net> wrote in message
news:Qo2cnWWsM-7...@speakeasy.net...