![]() |
"Change Button Image" icons not getting updated |
Post Reply ![]() |
Author | |
coolzsunil ![]() Groupie ![]() Joined: 18 March 2009 Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
coolzsunil ![]() Groupie ![]() Joined: 18 March 2009 Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
coolzsunil ![]() Groupie ![]() Joined: 18 March 2009 Status: Offline Points: 28 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Unfortunatelly CustomIcons check if icon has only single image before set it. :(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |