Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - One theme for all controls?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

One theme for all controls?

 Post Reply Post Reply
Author
Message
maxxan View Drop Down
Groupie
Groupie


Joined: 15 July 2009
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote maxxan Quote  Post ReplyReply Direct Link To This Post Topic: One theme for all controls?
    Posted: 11 January 2016 at 8:13am
Is there a way to set one theme for the app (say VS2015) and then all controls uses that theme or do I have to set the theme for every single control, like report control, pane manager, task panels etc? Sounds very inconvenient that that's the case!

I tried
XTPThemeDLL()->SetHandle(xtpIniVisualStudio2015Dark);
CXTPPaintManager::SetTheme(xtpThemeVisualStudio2015);

in OnCreate, before any other control is created, but that does just change the theme for ribbons and the frame, but all controls in the app have a different theme..
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2016 at 8:44am
I fully understand your frustration. Just look at the samples, how many time SetTheme, SetStyle etc. are called.


I really hope CodeJock consider this.

-cpede
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
maxxan View Drop Down
Groupie
Groupie


Joined: 15 July 2009
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote maxxan Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2016 at 9:30am
Yeah, it would be so much better if it was possible to set a theme for the whole application.
Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2016 at 6:40pm
You can use your top level window to send a WM_XTP_SETCONTROLTHEME message to all Controls objects like Buttons, Edit, etc that will allow you to make a single call.  We will be adding this functionality to remaining classes as well in the near future.

XTPThemeDLL()->SetHandle(xtpIniVisualStudio2015Light);
SendMessageToDescendants(WM_XTP_SETCONTROLTHEME, xtpControlThemeVisualStudio2015);
RedrawWindow(0, 0, RDW_ALLCHILDREN|RDW_INVALIDATE|RDW_ERASE);
Kirk Stowell, President and CEO
CODEJOCK SOFTWARE SOLUTIONS<
Back to Top
maxxan View Drop Down
Groupie
Groupie


Joined: 15 July 2009
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote maxxan Quote  Post ReplyReply Direct Link To This Post Posted: 12 January 2016 at 2:37am
Ok, so I create all controls first, then set the theme..

Maybe you should add that when a control is created, it should set its theme to what is currently set as a default theme.
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.172 seconds.