Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. list of most recently used files in file menu

list of most recently used files in file menu

Scheduled Pinned Locked Moved C / C++ / MFC
announcement
7 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    daniel madden
    wrote on last edited by
    #1

    Hi, I am using LoadProfileSettings(5) in InitInstance to open the 5 most recently used files when my application is loaded and AddToRecentFilename(szLoadFilename) to update the MRU list with the last file loaded. It all works fine except it abbreviates the full file path e.g. c:\my documents\my long directory\my file.doc becomes c:\my documents\...my file.doc Is there a way please of preventing it from abbreviating the full file path so I get c:\my documents\my long directory\my file.doc instead of c:\my documents\...my file.doc Thanks, Daniel

    D I 2 Replies Last reply
    0
    • D daniel madden

      Hi, I am using LoadProfileSettings(5) in InitInstance to open the 5 most recently used files when my application is loaded and AddToRecentFilename(szLoadFilename) to update the MRU list with the last file loaded. It all works fine except it abbreviates the full file path e.g. c:\my documents\my long directory\my file.doc becomes c:\my documents\...my file.doc Is there a way please of preventing it from abbreviating the full file path so I get c:\my documents\my long directory\my file.doc instead of c:\my documents\...my file.doc Thanks, Daniel

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      daniel madden wrote:

      It all works fine except it abbreviates the full file path e.g. c:\my documents\my long directory\my file.doc becomes c:\my documents\...my file.doc

      Where is this abbreviated path shown?


      "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

      "There is no death, only a change of worlds." - Native American Proverb

      D 1 Reply Last reply
      0
      • D daniel madden

        Hi, I am using LoadProfileSettings(5) in InitInstance to open the 5 most recently used files when my application is loaded and AddToRecentFilename(szLoadFilename) to update the MRU list with the last file loaded. It all works fine except it abbreviates the full file path e.g. c:\my documents\my long directory\my file.doc becomes c:\my documents\...my file.doc Is there a way please of preventing it from abbreviating the full file path so I get c:\my documents\my long directory\my file.doc instead of c:\my documents\...my file.doc Thanks, Daniel

        I Offline
        I Offline
        Iain Clarke Warrior Programmer
        wrote on last edited by
        #3

        It does that so you don't end up with menus across the screen. To override this you'll need to search for OnInitMenu in the MFC sources. Good luck, it gets quite knotty down there... Iain.

        D 1 Reply Last reply
        0
        • D David Crow

          daniel madden wrote:

          It all works fine except it abbreviates the full file path e.g. c:\my documents\my long directory\my file.doc becomes c:\my documents\...my file.doc

          Where is this abbreviated path shown?


          "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

          "There is no death, only a change of worlds." - Native American Proverb

          D Offline
          D Offline
          daniel madden
          wrote on last edited by
          #4

          Hi David, c:\my documents\my long directory\my file.doc was a simple example that gets an abreviated path of c:\my documents\...my file.doc. Thererefore c:\my documents\... is the abbreviated path of c:\my documents\my long directory\. Daniel

          D 1 Reply Last reply
          0
          • I Iain Clarke Warrior Programmer

            It does that so you don't end up with menus across the screen. To override this you'll need to search for OnInitMenu in the MFC sources. Good luck, it gets quite knotty down there... Iain.

            D Offline
            D Offline
            daniel madden
            wrote on last edited by
            #5

            thanks for the suggestion Iain. It does indeed get quite knotty down there. For now, I have a simple workaround of setting the CRecentFileList's member variable m_nMaxDisplayLength to show longer length filenames and paths, Cheers, Daniel

            1 Reply Last reply
            0
            • D daniel madden

              Hi David, c:\my documents\my long directory\my file.doc was a simple example that gets an abreviated path of c:\my documents\...my file.doc. Thererefore c:\my documents\... is the abbreviated path of c:\my documents\my long directory\. Daniel

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              I understood all that. My question was where is this path shown?


              "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

              "There is no death, only a change of worlds." - Native American Proverb

              D 1 Reply Last reply
              0
              • D David Crow

                I understood all that. My question was where is this path shown?


                "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

                "There is no death, only a change of worlds." - Native American Proverb

                D Offline
                D Offline
                daniel madden
                wrote on last edited by
                #7

                Ok - sorry the path is shown at the bottom of the File Menu where it usually shows the most recently used files.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups