Ștefan-Mihai MOGA
Ștefan-Mihai MOGA

Reputation: 343

MFC toolbar on top row with right align

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)?

Upvotes: 1

Views: 1622

Answers (1)

DAC84
DAC84

Reputation: 489

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
}

Upvotes: 1

Related Questions