Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Separator in dynamic toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Separator in dynamic toolbar

 Post Reply Post Reply
Author
Message
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Topic: Separator in dynamic toolbar
    Posted: 10 March 2004 at 12:48am

Hi,

I have created a dynamic toolbar (not loaded from resources):

CXTPToolBar* pToolBar2 = pCommandBars->Add(_T("Yoav"), xtpBarTop);

pToolBar2->SetBarID(12000);

UINT* pArr = new UINT[3];

pArr[0] = 1001;

pArr[1] = 1002;

pArr[2] = 1003;

CBitmap* pBmp = new CBitmap;

pBmp->LoadBitmap(IDB_BITMAP1);

pToolBar2->SetButtons(pArr,3);

CXTPImageManager* pImageManager = pCommandBars->GetImageManager();

pImageManager->SetIcons(*pBmp,pArr,3,CSize(16,15),xtpImageNormal,TRUE);

I want to add a separator between item2 and item3.

How do I do that ?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2004 at 6:14am
When you are adding the control to your command bar you change the "before" parameter to the index of the control to be inserted. 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2004 at 1:32pm
pToolBar2->GetControl(2)->SetBeginGroup(TRUE);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.