Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Ribbonbar application - recent files Collapse All
Subject Author Date
Brian Horn Feb 7, 2007 - 10:32 PM

In Ribbonbar application I have loaded all recent files list in Application button of ribbonbar. But can you tell me how to write the code to open these recent files again. ( How to handle events to open these recent files list. Is there any virtual method that we need to override? )

Andrew Banks Feb 16, 2007 - 12:22 PM

I dont know if you care but this works.

void CMyRibbonBar::OnRibbonGalleryItemSelEndOK(
    CExtRibbonGalleryWnd & wndRG,
    CExtRibbonGalleryPopupMenuWnd * pGalleryPopup,
    CExtRibbonButtonGallery * pRibbonGalleryTBB,
    CExtToolBoxWnd::TOOLBOX_ITEM_DATA * pTBCI
    )
{
    pGalleryPopup->DestroyWindow() ;
    theApp.OpenDocumentFile( LPCSTR(pTBCI->TextGet()) );
}

theApp is variable made by mfc in your ProgApp class.

Technical Support Feb 17, 2007 - 1:24 PM

Yes, this is acceptable.

Technical Support Feb 8, 2007 - 8:45 AM

The Application button is a modified version of the ribbon gallery button. The recent file list is a styled version of the ribbon gallery control. You should override the CExtRibbonPage::OnRibbonGalleryItemSelEndOK() virtual method to handle click/selection events on the gallery control.

If you are using the MFC’s document/view architecture, you should get the registered in application document template object and invoke its CDocTemplate::OpenDocumentFile() method to open a new document from a file.