Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - "Change Button Image" icons not getting updated
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

"Change Button Image" icons not getting updated

 Post Reply Post Reply
Author
Message
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post Topic: "Change Button Image" icons not getting updated
    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
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.