Print Page | Close Window

Applying a theme to the whole interface

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23419
Printed Date: 23 December 2024 at 10:59am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Applying a theme to the whole interface
Posted By: yves
Subject: Applying a theme to the whole interface
Date Posted: 22 August 2017 at 2:36pm
Looking at the samples, it's not clear to me what the recommended and/or easiest way one should use to apply a theme (e.g. xtpThemeVisualStudio2015) to the whole UI (Main Frame, Ribbon, Toolbars, Panes, Status Bar, ...).

For example, if I add the following line
        XTPPaintManager()->SetTheme(xtpThemeVisualStudio2015);
as the end of my CMainFrame::OnCreate() method, my program now asserts (ASSERT(NULL != m_pGroupNormal)) on XTRibbonMarkupTheme.cpp#548  whereas it was running fine without it.

Anyone cares shedding some light on this whole topic of theming mechanism in the toolkit?

Thanks a lot!

Version 18.0.1 on Windows 10 w/ VS 2017.3 and SDK 8.1




Replies:
Posted By: olebed
Date Posted: 23 August 2017 at 11:05am
Hello yves,

About assertion - I can suppose that you forgot to call SetHandle() before SetTheme()
XTPResourceImages()->SetHandle(hModule, lpszINI);

For example look at  RibbonMDISample
CMainFrame::OnOptionsStyle() > CMainFrame::SetCommandBarsTheme()

Regards,
 Oleksandr Lebed



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net