Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » Gray & Hot images on toolbar Collapse All
Subject Author Date
Paul Cowan Jan 17, 2007 - 9:32 AM

How can I set gray and hot images for the toolbar buttons? The gray buttons that are currently being drawn from the normal button image looks like a gray blob, I’d like to specify my own image.

Paul Cowan Jan 19, 2007 - 9:35 AM

Are there any sample apps that show this?

Technical Support Jan 22, 2007 - 11:15 AM

There is no such a sample at the moment but we will add it later. Did you try the solution we suggested in this thread?

Technical Support Jan 17, 2007 - 1:26 PM


Prof-UIS supports normal/hovered/pressed/disabled icons for each command item both in toolbars and menus. You should construct a CExtCmdIcon object with these icons and put it into the command manager using g_CmdManager->CmdSetIcon().

The CExtCmdIcon class has four CExtBitmap properties: m_bmpNormal, m_bmpDisabled, m_bmpHover and m_bmpPressed. By default the m_bmpNormal bitmap is initialized using APIs like CExtToolControlBar::LoadToolBar() or CExtCmdManager::UpdateFromToolBar(). All the other icon bitmaps are generated automatically by the currently applied paint manager. So, by default the m_bmpDisabled, m_bmpHover and m_bmpPressed icon versions are generated on-the-fly from the m_bmpNormal bitmap when the icon is painted and re-generated when the paint manager is changed. You can initialize the m_bmpDisabled, m_bmpHover and m_bmpPressed icon images and mark them as persistent to avoid automatic image generation by Prof-UIS code. The CExtCmdIcon::m_dwFlags property is a set of flags which can contain one or more combinations of the following values:

__EXT_ICON_PERSISTENT_BITMAP_DISABLED - this flag should be present if the CExtCmdIcon::m_bmpDisabled property contains an image initialized by the user and should not be re-generated by Prof-UIS code.
__EXT_ICON_PERSISTENT_BITMAP_HOVER - the same for the CExtCmdIcon::m_bmpHover property.
__EXT_ICON_PERSISTENT_BITMAP_PRESSED - the same for the CExtCmdIcon::m_bmpPressed property.