Creating a vertical toolbar in visual c++
-
Iam using CToolBar class. Here is the code. if (!m_pToolBar->CreateEx(this, WS_EX_RIGHT|TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY CBRS_SIZE_FIXED | CBRS_ALIGN_RIGHT, CRect(0, 0, 0, 0), IDR_TOOLBAR_TAGCOLUMNS/*, CIDs::GetID()*/) || !m_pToolBar->LoadToolBar(IDR_TOOLBAR_TAGCOLUMNS)) { return FALSE; } This is creating a horizontal toolbar. Can anybody help me how to create a vertical toolbar?
-
Iam using CToolBar class. Here is the code. if (!m_pToolBar->CreateEx(this, WS_EX_RIGHT|TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY CBRS_SIZE_FIXED | CBRS_ALIGN_RIGHT, CRect(0, 0, 0, 0), IDR_TOOLBAR_TAGCOLUMNS/*, CIDs::GetID()*/) || !m_pToolBar->LoadToolBar(IDR_TOOLBAR_TAGCOLUMNS)) { return FALSE; } This is creating a horizontal toolbar. Can anybody help me how to create a vertical toolbar?
Hi, In the CreateEx(...) use CBRS_LEFT or CBRS_RIGHT instead of CBRS_TOP. Your Toolbar will be vertical...
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V
-
Hi, In the CreateEx(...) use CBRS_LEFT or CBRS_RIGHT instead of CBRS_TOP. Your Toolbar will be vertical...
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V
-
Hi SANTHOSH, Thanks for ur reply. I tried with the styles u specified. but still the buttons in the toolbar are aligned horizontally, I want it to display vertically. What do I need to do for that? Thanks, Neela
Hi, You better use this code..
if (!m\_wndToolBar.CreateEx(this, TBSTYLE\_FLAT, WS\_CHILD | WS\_VISIBLE | CBRS\_TOP | CBRS\_GRIPPER | CBRS\_TOOLTIPS | CBRS\_FLYBY | CBRS\_SIZE\_DYNAMIC) || !m\_wndToolBar.LoadToolBar(IDR\_MAINFRAME))
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V
-
Hi, You better use this code..
if (!m\_wndToolBar.CreateEx(this, TBSTYLE\_FLAT, WS\_CHILD | WS\_VISIBLE | CBRS\_TOP | CBRS\_GRIPPER | CBRS\_TOOLTIPS | CBRS\_FLYBY | CBRS\_SIZE\_DYNAMIC) || !m\_wndToolBar.LoadToolBar(IDR\_MAINFRAME))
The price of anything is the amount of life you exchange for it. Thanks and Regards. SANTHOSH V