Print Page | Close Window

Creating a RibbonBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5162
Printed Date: 11 November 2025 at 11:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Creating a RibbonBar
Posted By: baerten
Subject: Creating a RibbonBar
Date Posted: 28 September 2006 at 4:52am
Hi,

i like to create a RibbonBar like in the "Ribbon MDI Sample"

So i create a new Project in VS2003, choose ToolkitPro Project, MDI layout, Office2003 Style, ...

if i begin to applicate the sample code on my project, there is directly an error on this line :

    // Get a pointer to the command bars object.
    CXTPCommandBars* pCommandBars = GetCommandBars();
    if(pCommandBars == NULL)
    {
        TRACE0("Failed to create command bars object.\n");
        return -1;      // fail to create
    }
   
    pCommandBars->SetTheme(xtpThemeRibbon);

Which configuration must i set to create a RibbonBar?

Is there a step-by-step Tutorial to add a RibbonBar?

Thanks !



Replies:
Posted By: Oleg
Date Posted: 28 September 2006 at 8:56am
Hi,
You need add bitmaps of Ribbon to your exe.
 
If you use 10.3.1 just add
#include "Ribbon\Styles\Office2007Blue\Office2007Blue.rc"
in your res\app.rc2 file.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: baerten
Date Posted: 28 September 2006 at 10:18am
Thanks for the help

Now it works fine


Posted By: baerten
Date Posted: 28 September 2006 at 10:56am


Where i can add these large icons to the RibbonBar?

I inserted the 4 .png files to my "res" directory.

So, how i can create my own icons and insert them into the Bar

Big thanks



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