Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Map a control ID to certain icon ID?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Map a control ID to certain icon ID?

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Map a control ID to certain icon ID?
    Posted: 10 April 2009 at 4:37am
Is it possible to map a certain control ID to a certain icon ID, so that it gets this icon whereever possible? I know I can call SetIconId(), but that is not always possible (e.g. you show a CMenu through XTResourceManager()).
 
Something like this:
SetIcons(controlID_list, iconID_list);
 
Is this possible?
PokerMemento - http://www.pokermemento.com/
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: 10 April 2009 at 6:34am
Hi,
You can enable Actions and assign iconId to corresponded action.
See Actions sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
randallmking View Drop Down
Newbie
Newbie
Avatar

Joined: 23 September 2008
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote randallmking Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2009 at 5:17pm
I have been unable to get the Actions to work for IconID. The ActionsSampe for VB does not show an IconID sampe and if I add the code:
 
Commandbars.Actions(ID_FILE_NEW).IconID = ID_EDIT_UNDO, then the image is empry on the ID_FILE_NEW button and menu
 
When I attempt to use Actions with IconID in my program I get the error message:
 
"Object does not support this property or method"
 
But I can use Actions to change the other properties such as Tag or Enabled.
 
CommandBars.Actions.Add ID_CalcZone_Dropdown, "Calculation Zone", "Insert a Calculation Zone", "", "Calculation Zone"
 
'add Control in another function
 
CommandBars.Actions(ID_CalcZone_Dropdown).Enabled = False (this works)
 
CommandBars.Actions(ID_CalcZone_Dropdown).IconID = ID_CalcZone_Rectangle (this creates the error message)
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.203 seconds.