Before we go through the code we just need to know the window layout of a floating toolbar.
Here it is:
CToolbar
CDockBar
CMiniDockFrameWnd
Suppose, we have a toolbar pointer pToolBar. Here is the code to change its caption.
pToolBar->SetWindowText(szToolBarName);
CMiniDockFrameWnd *pParentFrame;
pParentFrame = DYNAMIC_DOWNCAST(CMiniDockFrameWnd,
pToolBar->GetParentFrame));
if(pParentFrame != NULL)
{
pParentFrame->m_wndDockBar.SetWindowText(szToolBarName);
pParentFrame->SetWindowText(szToolBarName);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment