Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have a class derived from CDockablePane and i added a toolbar to it CMFCToolBar m_wndToolBar;

in the dockable panes oncreate i do this

C#
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_LEFT
        | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
        !m_wndToolBar.LoadToolBar(IDR_JOGLEN_TB,0,0,TRUE))
    {
        TRACE0("Failed to create toolbar\n");
        return -1;      // fail to create
    }
    m_wndToolBar.SetWindowText ("Jog cursor");
    m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
    EnableDocking(CBRS_ALIGN_ANY);
    RECT rect;
    DockPane(&m_wndToolBar, &rect, DM_STANDARD);


which creates a toolbar just fine but without the docking handles

the problem is inside DockPane(&m_wndToolBar, &rect, DM_STANDARD);

inside that if fails on a line pTargetBar->CanAcceptPane(this)

so basically its saying the dockable pane can't accept the toolbar, but i don't know why of if there is a way to fix it.

i realize this is a bit of a detailed problem but ,aybe someone has an idea, thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900