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 » Theme Switcher Toolbar Collapse All
Subject Author Date
Burak Petekkaya Apr 10, 2007 - 8:31 AM

Dear Sir/Madam,



We have a Visual C++ 6.0 Mfc project with Prof-UIS.

When we run application we can change current GUI Theme over Theme Switcher Toolbar

But I can’t realize the event of changing themes in the code. How can I do this?
How can I use OnThemeChanged method?
Hope to hear back from you as soon as possible.



Best regards.

Burak Petekkaya Apr 11, 2007 - 1:21 AM

Dear Sir\Madam,

When we run our visual C++ 6.0 Mfc application ,At first, we can see all of the Theme (it must be thirteen) on the Theme Switcher Toolbar.But now there are only eight Theme on it.How did the other Theme leave?

Technical Support Apr 11, 2007 - 10:30 AM

There is a CExtThemeSwitcherToolControlBar ::m_bEnableOffice2007r3 property, which when set to true, adds three additional themes. But these themes are relevant to the ribbon control only. So if you have no ribbon bar, there is no point to turn this option on.





Technical Support Apr 10, 2007 - 9:56 AM

We have just added a FAQ that should answer your question:

How to catch the event when the current theme has changed?

Suhai Gyorgy Apr 10, 2007 - 9:10 AM

Make a theme switcher toolbar class derived from CExtThemeSwitcherToolControlBar and override the following method in it:    virtual void ThemeSwitcher_OnButtonInvoke(
        CExtThemeSwitcherToolButton * pTBB
        );

In it you should call base class method first and then you can do whatever code you need. E.g.:

void CMyThemeSwitcherToolControlBar::ThemeSwitcher_OnButtonInvoke(
	CExtThemeSwitcherToolButton * pTBB
	)
{
	CExtThemeSwitcherToolControlBar::ThemeSwitcher_OnButtonInvoke(pTBB);
CRuntimeClass * pRTC = NULL;
	if( ! m_mapCmd2RTC.Lookup( pTBB->GetCmdID(false), pRTC ) )
		return;
	if ( pRTC == RUNTIME_CLASS( CExtPaintManagerStudio2005 ) ) {
		// do something here
	}
}
The only problem is, this method is called also when the currently selected theme’s button is clicked in the toolbar. Check out base class implementation in ProfUIS source to see how they check for this.