Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Adding Control / Button to existing Tabbed Toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding Control / Button to existing Tabbed Toolbar

 Post Reply Post Reply
Author
Message
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Topic: Adding Control / Button to existing Tabbed Toolbar
    Posted: 13 February 2007 at 12:49am
Hello
 
How can we added a Control / Button to already existing Tabbed Toolbar.
 
Here CXTPTabtoolbar m_pToolbar = (CXTPTabToolBar*)pCommandBars->Add(_T("FPD"), xtpBarFloating, RUNTIME_CLASS(CXTPTabToolBar));

m_pToolBar->InsertCategory(0, _T("FPD"), StandardIcons, _countof(StandardIcons));

would create a new tab and adds the controls to that particular tab.
 
Now at situations I would like to add control / controls individually to the existing tab in the Tabbed Toolbar.
 
thanks
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2007 at 7:12am

Any suggestions.......

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 13 February 2007 at 7:44am
Hi,
 
Add button:
m_pToolBar->GetControls()->Add(..);
assign Category:
pControl->SetCategory("...");
and upadte tabs:
pToolBar->UpdateTabs();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2007 at 8:14am
Originally posted by oleg oleg wrote:

Hi,
 
Add button:
m_pToolBar->GetControls()->Add(..);
assign Category:
pControl->SetCategory("...");
and upadte tabs:
pToolBar->UpdateTabs();
 
Hello
 
Here the Tab is already created and populated with Buttons on it.
 
So by calling m_pToolBar->GetControls()->Add(xtpControlButton);
would add a control to that particular tab in the Tabbed Toolbar but how to get handle to the control so as to say pControl->SetCategory?
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2007 at 9:05am
Hello
 
By creating control in this way will not call OnCreateControl, wereas we need to go through OnCreateControl path.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 13 February 2007 at 9:29am
Hi,
Check code of XTPTabToolBar::InsertCategory to understand how it works.
 
You can send WM_XTP_BEFORECREATECONTROL if you wish:
 
XTP_COMMANDBARS_CREATECONTROL cs;
...
...
if (SendMessage(WM_XTP_BEFORECREATECONTROL, 0, (LPARAM)&cs) != 0)
    {
     pControl = cs.pControl;
    }
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2007 at 1:48am
Hello
 
Attached sample to issue 12487
 
Pls suggest on it..
Back to Top
venkyhyd View Drop Down
Groupie
Groupie


Joined: 29 June 2006
Location: India
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote venkyhyd Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2007 at 5:40am
Hello can you pls suggest on this issue#12662
thanks
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.066 seconds.