Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - What does AddCategories(CXTPControls* ) do?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

What does AddCategories(CXTPControls* ) do?

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


Joined: 21 June 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote tralfaz Quote  Post ReplyReply Direct Link To This Post Topic: What does AddCategories(CXTPControls* ) do?
    Posted: 10 August 2009 at 9:12pm
When I added it, nothing showed up differently in the customize dialog. I expected a new tab category called Controls showing the buttons in the list

        CXTPCustomizeCommandsPage* pCommands = dlg.GetCommandsPage();
        CXTPToolBar* pTBar = pCommandBars->GetToolBar(IDR_CUSTOM_TOOLBAR);
        if (pTBar) {
            CXTPControls* pControls = pTBar->GetControls();
            pCommands->AddCategories(pControls);
        }

XP Pro SP3 / VS2008 C++ / Xtreme CommandBars v13.1.0
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: 12 August 2009 at 3:07am
why "Controls" ?
 
Your controls in toolbar doesn't have Category assigned. Try pControls->GetAt(0)->SetCategory("Category");
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
tralfaz View Drop Down
Groupie
Groupie


Joined: 21 June 2009
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote tralfaz Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2009 at 9:57am
Based on your response, I put your line of code here:

        CXTPToolBar* pTBar = pCommandBars->GetToolBar(IDR_CUSTOM_TOOLBAR);
        if (pTBar) {
            CXTPControls* pControls = pTBar->GetControls();
            pControls->GetAt(0)->SetCategory("Category");
            pCommands->AddCategories(pControls);
        }

Of course it didn't work because I need more information.

1. There is an AddCategories(CXTPControls* pControls)
2. What does it do?
3. Can I use it to display controls from a toolbar?

Here's the problem. Your All Commands only show the commands from a Menu. I have custom commands (not in the menu) the user can create inside the program. How do I get those to show in Customize? One way would be to expose the controls from the Custom Toolbar.

XP Pro SP3 / VS2008 C++ / Xtreme CommandBars v13.1.0
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: 13 August 2009 at 1:56am

Hi,

 
See code in \Samples\CommandBars\CustomThemes  it adds additonal buttons to command page.
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.156 seconds.