Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Get a Control Icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Get a Control Icon

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


Joined: 02 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marek Quote  Post ReplyReply Direct Link To This Post Topic: Get a Control Icon
    Posted: 25 February 2005 at 2:22pm

Hi,

Can anyone suggest a way to get an individual icon from a command bar control? ie Get an icon with a certain ID from the ImageManager??? Seems that you can Count, DrawReverted, Add, Load and RemoveAll but you can't just get one of them.

Or, is there a way to get the collection of icons from the CommandBars and assign that same collection to the Docking Pane Control's Icons property? Seems the Command Bar collection is not compatible with the Docking Pane collection.

Thanks,

-m

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2005 at 2:33pm
No, you can't get an individual icon from the ImageManager.  But you can use the icons from the CommandBars in the DockingPanes.

Try:

DockingPaneManager.Icons.AddIcons CommandBars.Icons

Or

DockingPaneManager.Icons = CommandBars.Icons

But the icons will have the same IconId as when they were added to the CommandBars ImagManager so you will have to set the IconId for each Docking Pane to match the IconIds in the ImageManager.
Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2005 at 2:48pm

I expect it's just my limited knowledge of ATL but how do you copy the command bars icons to the docking panes using ATL?

I've tried:

 m_spDockingPanes->Icons = spCommandBars->Icons;
and

m_spDockingPanes->Icons->AddIcons( spCommandBars->Icons );

But they both give me this error:

error C2664: 'AddIcons' : cannot convert parameter 1 from 'class _com_ptr_t<class _com_IIID<struct XtremeCommandBars::IImageManagerIcons,&struct __s_GUID _GUID_00020400_0000_0000_c000_0000
00000046> >' to 'struct XtremeDockingPane::IImageManagerIcons *'
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2005 at 3:05pm
I haven't used ATL, but it looks like you need to do some type casting.

For example, this code is from C# copying the icons from a CommandBars ImageManager Control to the Icons collection of the Shortcut bar.  ImageManager is a the Separate ImageManager control in this example.  However you can use the CommandBars.Icons collection as well.
 
wndShortcutBar.Icons = (XtremeSuiteControls.ImageManagerIcons)ImageManager.Icons;
Back to Top
maxy View Drop Down
Newbie
Newbie


Joined: 28 February 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote maxy Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2005 at 4:33am

 

brisbane_chap@yahoo.com

ifound out more about icons

 

Back to Top
maxy View Drop Down
Newbie
Newbie


Joined: 28 February 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote maxy Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2005 at 4:35am

Originally posted by SuperMario SuperMario wrote:

No, you can't get an individual icon from the ImageManager.  But you can use the icons from the CommandBars in the DockingPanes.

Try:

DockingPaneManager.Icons.AddIcons CommandBars.Icons

Or

DockingPaneManager.Icons = CommandBars.Icons

But the icons will have the same IconId as when they were added to the CommandBars ImagManager so you will have to set the IconId for each Docking Pane to match the IconIds in the ImageManager.

brisbane_chap@yahoo.com

 

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.125 seconds.