Print Page | Close Window

WTL ImageManagerIcons::AddBitmap code

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=4359
Printed Date: 21 June 2025 at 2:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WTL ImageManagerIcons::AddBitmap code
Posted By: Vincent3
Subject: WTL ImageManagerIcons::AddBitmap code
Date Posted: 06 June 2006 at 5:30am
To help WTL developer (thanks to Oleg), this is a WTL code to use the fonction AddBitmap in the RibbonBar 10.2

 static int icons[] = {ID_FILE_NEW, ID_FILE_OPEN, ID_FILE_SAVE, ID_EDIT_CUT, ID_EDIT_COPY, ID_EDIT_PASTE, ID_FILE_PRINT, ID_APP_ABOUT};
CComSafeArray<int> safeCommands(_countof(icons));
for(int i = 0; i < _countof(icons); ++i)
    safeCommands.SetAt(i, icons);
hr = pImageManagerIcons->AddBitmap(HandleToLong(AtlLoadBitmap( ID_SMALL_ICONS)), CComVariant((LPSAFEARRAY)safeCommands), XtremeCommandBars::xtpImageNormal, VARIANT_FALSE);

olivier



Replies:
Posted By: JamesH
Date Posted: 05 July 2006 at 8:00pm
Thank you for posting this.  I just spent a while trying to figure out.  My problem was the fact that AddBitmap isn't listed in the documentation as a member of the command bars image manager icons.  It only lists AddIcon....



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