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