Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Malcolm D
|
Apr 10, 2008 - 11:38 PM
|
What is a way of having a button/item which changes its image? It needs to work with customisation. It is a button that is like a checked/ unchecked except its image changes instead of its checked state. therefore it also needs to update based on some internal variable.
Is there a simple way of doing this?
|
|
Technical Support
|
Apr 11, 2008 - 9:56 AM
|
In the case of non-customizable toolbars and menus, you should use the command manager (the CExtCmdManager::CmdSetIcon() method). Otherwise, the command manager keeps the original version of command’s icon. Each toolbar button and menu item is described by the corresponding instance of the CExtCustomizeCmdTreeNode , which stores a customized version of the icon because the user can change/edit the icon when the Customize dialog is open. The customized version of icon is stored in the CExtCustomizeCmdTreeNode::m_iconCustomized property. Its protected in 2.82 but public in 2.83 and will be public in latter versions. So, you should mark it as public.
|
|