Print Page | Close Window

What does AddCategories(CXTPControls* ) do?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14945
Printed Date: 26 June 2024 at 7:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: What does AddCategories(CXTPControls* ) do?
Posted By: tralfaz
Subject: What does AddCategories(CXTPControls* ) do?
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: tralfaz
Date 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


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net