Get a Control Icon |
Post Reply |
Author | |
Marek
Groupie Joined: 02 February 2005 Status: Offline Points: 20 |
Post Options
Thanks(0)
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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. |
|
JamesH
Senior Member Joined: 01 December 2004 Status: Offline Points: 149 |
Post Options
Thanks(0)
|
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; 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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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; |
|
maxy
Newbie Joined: 28 February 2005 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
maxy
Newbie Joined: 28 February 2005 Status: Offline Points: 2 |
Post Options
Thanks(0)
|
|
|
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 |