Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC
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
good
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?
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 840
1 OriginalGriff 437
2 Abhinav S 303
3 thatraja 215
4 Emre Ataseven 200
0 Sergey Alexandrovich Kryukov 8,122
1 OriginalGriff 4,520
2 Peter Leow 3,744
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 15 Feb 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid