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. Adding a second recent file list to the MFC ribbon bar

Adding a second recent file list to the MFC ribbon bar

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
3 Posts 1 Posters 1 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.
  • L Offline
    L Offline
    Leif Simon Goodwin
    wrote on last edited by
    #1

    We use the standard CMFCRibbonBar class to implement a ribbon consisting of a drop down 'File' menu followed by some tabs to select the ribbon panels. Our 'File' menu has a vertical list of menu items, on hte left side of the drop down menu, and on the right side, a recent file list: Recent Documents 1 FileA 2 FileB 3 FileC We want to extend this as we have recent documents and recent folders: Recent Documents 1 FileA 2 FileB 3 FileC Recent Folders 1 FolderA 2 FolderAB 3 FolderAC Is anyone aware of any previous implementations of this that I can use? :-D Or any hints as to the easiest/best way to do this? Obviously we can add menu items to the File menu for 'Recent Documents' and 'Recent Folders', and this would work, but it is not the preferred choice. Thanks.

    L 1 Reply Last reply
    0
    • L Leif Simon Goodwin

      We use the standard CMFCRibbonBar class to implement a ribbon consisting of a drop down 'File' menu followed by some tabs to select the ribbon panels. Our 'File' menu has a vertical list of menu items, on hte left side of the drop down menu, and on the right side, a recent file list: Recent Documents 1 FileA 2 FileB 3 FileC We want to extend this as we have recent documents and recent folders: Recent Documents 1 FileA 2 FileB 3 FileC Recent Folders 1 FolderA 2 FolderAB 3 FolderAC Is anyone aware of any previous implementations of this that I can use? :-D Or any hints as to the easiest/best way to do this? Obviously we can add menu items to the File menu for 'Recent Documents' and 'Recent Folders', and this would work, but it is not the preferred choice. Thanks.

      L Offline
      L Offline
      Leif Simon Goodwin
      wrote on last edited by
      #2

      As far as I can see the ribbon code does not allow what we want without making significant changes to the code. So I'll use a standard sub-menu. Does anyone know how to dynamically add a sub-menu item with no icons, and the text left aligned? I always get a space for the icon i.e. the text is moved right by a significant distance, even though I pass -1 for the icon indices.

      L 1 Reply Last reply
      0
      • L Leif Simon Goodwin

        As far as I can see the ribbon code does not allow what we want without making significant changes to the code. So I'll use a standard sub-menu. Does anyone know how to dynamically add a sub-menu item with no icons, and the text left aligned? I always get a space for the icon i.e. the text is moved right by a significant distance, even though I pass -1 for the icon indices.

        L Offline
        L Offline
        Leif Simon Goodwin
        wrote on last edited by
        #3

        Just in case anyone else wants to do this, I can't for the life of me work out how to left align the menu item, so I created a custom button and overrode the OnDraw method.

        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