Print Page | Close Window

RibbonBar System Button

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=6051
Printed Date: 12 November 2025 at 3:25am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonBar System Button
Posted By: davidsimmonds
Subject: RibbonBar System Button
Date Posted: 09 January 2007 at 1:34pm
What exactly is needed to be authored for bitmaps and icons for the System Button fora RibbonBar? I see the example, but it uses a PNG file. I assume a bitmap can be used instead? What are the requirements? https://forum.codejock.com/uploads/20070109_133315_untitled.zip - uploads/20070109_133315_untitled.zip
 
The zip file contains a screen shot of what my System Button looks like. I have obviously done something incorrect.



Replies:
Posted By: davidsimmonds
Date Posted: 09 January 2007 at 5:28pm
I have used the following code to create the RibbonBar:
 

CMyRibbonBar* pRibbonBar = (CMyRibbonBar*)pCommandBars->Add(_T("The Ribbon"), xtpBarTop, RUNTIME_CLASS(CMyRibbonBar));

if (!pRibbonBar)
return FALSE;

pRibbonBar->EnableDocking(0);

CMenu mnuMain; mnuMain.LoadMenu(IDR_MAINFRAME_EX);

CXTPControlPopup* pControlFile = (CXTPControlPopup*)pRibbonBar->AddSystemButton(ID_MENU_FILE);

pControlFile->SetCommandBar(mnuMain.GetSubMenu(0));

pControlFile->SetIconId(IDB_MAINFRAME);

UINT uCommand = {IDB_MAINFRAME};

pCommandBars->GetImageManager()->SetIcons(IDB_MAINFRAME, &uCommand, 1, xtpImageNormal);

pCommandBars->GetImageManager()->SetIcons(IDB_MAINFRAME, &uCommand, 1, xtpImageHot);

pCommandBars->GetImageManager()->SetIcons(IDB_MAINFRAME, &uCommand, 1, xtpImagePressed);

pRibbonBar->GetQuickAccessControls()->Add(xtpControlButton, ID_FILE_RUNINBACKGROUND);

pRibbonBar->GetQuickAccessControls()->Add(xtpControlButton, ID_EDIT_PREFERENCES);

pRibbonBar->GetQuickAccessControls()->CreateOriginalControls();

pRibbonBar->SetCloseable(FALSE);

pRibbonBar->EnableFrameTheme();

https://forum.codejock.com/uploads/20070109_172405_mainframe.zip - uploads/20070109_172405_mainframe.zip

This is the image that I am using.
 
Also, the images in the QuickAccess are too small. They are 16x16 bitmaps, but they dont appear correct. Here is a screen shot:
 
https://forum.codejock.com/uploads/20070109_172758_untitled2.zip - uploads/20070109_172758_untitled2.zip
 
What do I need to do to fix this?


Posted By: Oleg
Date Posted: 10 January 2007 at 1:28am
Hi,
 
Write to support
http://www.codejock.com/support/ - http://www.codejock.com/support/


-------------
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