Print Page | Close Window

"Change Button Image" icons not getting updated

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=14042
Printed Date: 03 December 2024 at 2:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: "Change Button Image" icons not getting updated
Posted By: coolzsunil
Subject: "Change Button Image" icons not getting updated
Date Posted: 16 April 2009 at 1:22pm
Hi,
 
I am having problems setting icons on the Control, when we select an icon from the "Change Button Image" option in Customize menu for an individual Command Bar Control.

I have an ImageManager component, myImageManager; in which I am loading icons using the ImageManagerIcons::LoadBitmapFromResource method.
There are 64 icons, with ids from 1 - 64.
 
In the Customization event, I am removing all the present icons and adding the icons to CustomizeOptions::CustomIcons using the AddIcons
method and giving myImageManager::GetIcons() as the parameter to AddIcons function.
 
ICustomizeOptions *pOptions;
 
pOptions->GetCustomIcons()->RemoveAll();
 
pOptions->GetCustomIcons()->AddIcons(myImageManager->GetIcons());
 
I see the icons in the "Change Button Image" option. But if i select any icon, it does not get updated on the control.
 
Is there anything that I am doing wrong?
 
What is wrong?
 
Product: Xtreme Command Bars ActiveX v13.0.0
Platform: Windows XP (32bit) - SP 3
Language: Visual C++ 2008, ATL
 



Replies:
Posted By: Oleg
Date Posted: 17 April 2009 at 1:55am
Hi,
 
All you do sounds right :(
Maybe you can upate our sample and attach it here to trace problem ?


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


Posted By: coolzsunil
Date Posted: 17 April 2009 at 2:28am
Hi Oleg,

It is a huge product I am working upon, so cannot share our work.

I was browsing the forums and saw a similar discussion in the following link:

http://forum.codejock.com/forum_posts.asp?TID=13009

I downloaded the VB sample in this forum link and saw that the person was using ImageManagerIcons::loadbitmap method.

In his case everything is working fine.

Is there any difference between these 2 methods: ImageManagerIcons::loadbitmap  and ImageManagerIcons::LoadBitmapFromResource?


Posted By: coolzsunil
Date Posted: 17 April 2009 at 11:19am
Hi Oleg,

I was able to solve it but I am not pretty satisfied with the implementation though.

The ImageManager that I had used to load icons from resource contained multiple icons with the same id but having different pixel size.

But when I added only icons of the same pixel type and then load it into the CustomizeOptions::CustomIcons, then it is working fine.

My doubts is whether the CustomizeOptions::CustomIcons, is it able to handle cases when there are multiple icons with the same id but
different pixel size.

Need your opinion on this.


Posted By: Oleg
Date Posted: 20 April 2009 at 2:29am
Hi,
 
Unfortunatelly CustomIcons check if icon has only single image before set it. :(


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