BCGControlBar Pro for MFC
void CBCGPExplorerToolBar::EnableNavigationButtons ( UINT  nBackID,
UINT  nForwardID,
UINT  nHistoryID,
UINT  nHistoryItemID,
int  xRightMargin = 15,
UINT  nUpID = 0,
BOOL  bSimplifiedNavigationButtons = FALSE,
UINT  nHomeID = 0,
UINT  nRefreshID = 0,
UINT  nStopID = 0 
)

Enables navigation buttons.

Call this method to enable navigation buttons on the explorer toolbar.

You should specify command IDs to be used for "back", "forward" and "history" buttons. The "history" button opens a popup menu with navigation history items.

If you wish to display a navigation history, you must specify nHistoryItemID and override CBCGPFrameWnd::OnShowPopupMenu in the main frame. In this override you should replace dummy items having nHistoryItemID with the real menu buttons.

Copy
BOOL CMainFrame::OnShowPopupMenu (CBCGPPopupMenu* pMenuPopup)
{
CBCGPPopupMenuBar* pMenuBar = pMenuPopup->GetMenuBar ();
................. // loop over all buttons in the menu bar
if (pButton->m_nID == ID_VIEW_HISTORY)
{
CMenu menuHistory;
menuHistory.LoadMenu (IDR_HISTORY_POPUP);
CMenu* subMenu = menuHistory.GetSubMenu (0);
.....
// modify the menu
pMenuBar->ImportFromMenu (subMenu->GetSafeHmenu ());
}
}
Parameters
nBackIDSpecifies the "back" command ID.
nForwardIDSpecifies the "forward" command ID.
nHistoryIDSpecifies the "history" command ID.
nHistoryItemIDCommand ID of a dummy item, which should be replaced later by real history items in the OnShowPopupMenu override.
xRightMarginSpacing between navigation buttons and the first toolbar button.
nUpIDSpecifies the "up level" command ID.
bSimplifiedNavigationButtonsSpecifies whether the navigation buttons should be drawn using simple icons (arrows).
nHomeIDSpecifies the "home" command ID.
nRefreshIDSpecifies the "refresh" command ID.
nStopIDSpecifies the "stop" command ID.