我的程序是MFC编的,我想在启动的时候就自动打开“最近文件”列表中的第一个文件。
我想知道如何在程序里取得MRU里面的文件名。
谢谢!

解决方案 »

  1.   

    CRecentFileList supports control of the most recently used (MRU) file list.
      

  2.   

    我看到有文章说操作CWinApp基类中已经定义的m_pRecentFileList来得到。
    但是我在BOOL CTestmdiApp::InitInstance()中
    加入这一句:
    m_pRecentFileList->GetSize();
    编译报错:
    error C2027: use of undefined type 'CRecentFileList'
      

  3.   

    如果写上这一句 CRecentFileList    m_pRecentFileList;
    就会报错为'm_pRecentFileList' uses undefined class 'CRecentFileList'
    即然m_pRecentFileList是CWinApp基类中已定义的,为什么我无法操作它呢?