|
|
|
|
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 |
|
Moby Dick
|
Jun 10, 2005 - 5:57 AM
|
Hello all, How can I change dynamically the UI style and menu options (animations, tooltips, ...) for all the opened window of my application ? I want to do this for my Options dialog who have an apply button. The code I use refreshes the window but labels on CExtStatusBar and toolbars buttons don’t refresh their styles. How can I perform this ? Best regards.
|
|
Technical Support
|
Jun 11, 2005 - 9:50 AM
|
The menu options are available as static properties of the CExtPopupMenuWnd class: g_bMenuWithShadows , g_bMenuExpanding , g_bMenuDelayExpanding , g_bMenuHighlightRarely , g_bMenuShowCoolTips , g_bMenuExpandAnimation , g_bUseStretchOnExpandAnimation , g_bMenuLargeIcons and g_DefAnimationType . The CExtToolControlBar also has its own static properties, which are g_bToolbarLargeIcons , g_bToolbarScreenTips and g_bToolbarShortcutKeysOnScreenTips . You can change these properties directly because they are public C++ class properties.
To change the active theme, please invoke the following code: VERIFY(
g_PaintManager.InstallPaintManager(
new CExtPaintManager
// or new CExtPaintManagerXP
// or new CExtPaintManagerOffice2003
// or new CExtPaintManagerStudio2005
)
); After changing the CExtToolControlBar::g_bToolbarLargeIcons property and after re-installing the paint manager, do not forget to re-calculate the layout of all windows in your application. In case of frame window based applications, this can be done with the following code:
pMainFrame->RecalcLayout();
pMainFrame->RedrawWindow( NULL, NULL,
RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE
| RDW_FRAME | RDW_ALLCHILDREN
);
CExtControlBar::stat_RedrawFloatingFrames( pMainFrame );
CExtControlBar::stat_RecalcBarMetrics( pMainFrame );
|
|