Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Applying a theme to the whole interface
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Applying a theme to the whole interface

 Post Reply Post Reply
Author
Message
yves View Drop Down
Newbie
Newbie


Joined: 05 June 2017
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote yves Quote  Post ReplyReply Direct Link To This Post Topic: Applying a theme to the whole interface
    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

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (1) Thanks(1)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.