Click here to Skip to main content
13,005,991 members (92,799 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Is it normal behavior for the ID_FILE_MRU_FILEn messages to be handled in the document class (where they seem to work fine), but not the CMainFrame class (where they do not work - at least in my app)?
Posted 10-Feb-11 6:21am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

A quick search of the MFC codebase with ID_FILE_MRU shows that these messages are handled by the CWinApp class.

This maps the command range of ID_FILE_MRU_FILE1..16 to the same function OnOpenRecentFile.

It appears to be teh document object that handles the command because the application object just sends the file to the DocTemplate list, finds the template which can handle the document type (if any) and tries to open it.

The mainframe is never involved in any of these steps.

So I am not too sure what your problem is, can you add any additional details?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 15 Feb 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100