Link to home
Start Free TrialLog in
Avatar of dmetzler
dmetzler

asked on

CWinApp::OpenDocumentFile() without adding to MRU file list

I have an MFC SDI doc/view app, and I want to be able to load files with the CWinApp::OpenDocumentFile() method but without having certain files be added to the MRU list.  (I do want an MRU list, but not all loaded files should show up there).

Is this possible?

Thanks,

Don
Avatar of GGRUNDY
GGRUNDY

From a quick look at the mfc source,
I'd say the best you can hope for is to remove it from the MRU list once it's in there.

m_pRecentFileList->Remove(nIndex)

but as m_pRecentFileList is a protected member of CWinApp so the you'll have to do the work in your CWinApp derived class.

Cheers Greg
Avatar of dmetzler

ASKER

Thanks - that did it!

Don
ASKER CERTIFIED SOLUTION
Avatar of GGRUNDY
GGRUNDY

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial