1

By default, MFC toolbar are docked on top row left align. Could anyone please tell me how to dock the MFC toolbar on top row with right align (meaning that all toolbar buttons are align to right on the top row)?

1 Answer 1

1

If u just want the tool bar at the right top corner, u can use the below code in CMainFrame

if (!m_wndRSToolBar.CreateEx(this, TTBSTYLE_FLAT, WS_OVERLAPPED | WS_VISIBLE | CBRS_TOP
    | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMI,Rect(700,0,0,0),IDR_MAINFRAME) ||    !m_wndRSToolBar.LoadToolBar(IDR_MAINFRAME1))
{
    TRACE0("Failed to create toolbar\n");
    return -1;      // fail to create
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.