Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to apply dark theme to dialog boxes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to apply dark theme to dialog boxes

 Post Reply Post Reply
Author
Message
g_j_a_i_n View Drop Down
Groupie
Groupie
Avatar

Joined: 27 August 2005
Status: Offline
Points: 94
Post Options Post Options   Thanks (0) Thanks(0)   Quote g_j_a_i_n Quote  Post ReplyReply Direct Link To This Post Topic: How to apply dark theme to dialog boxes
    Posted: 26 June 2020 at 8:47am

Hello,

I am using the following for dark theme and also made docking page, splitter etc use dark theme.

CXTPPaintManager::SetTheme(xtpThemeVisualStudio2012Dark);

This is working well.

Now, I don't know how to automatically make the dialog boxes also use the dark theme. Is there a way I can set a theme etc to tell all dialog boxes to use dark background and light text color. Basically dark theme.

Thanks.
Back to Top
g_j_a_i_n View Drop Down
Groupie
Groupie
Avatar

Joined: 27 August 2005
Status: Offline
Points: 94
Post Options Post Options   Thanks (1) Thanks(1)   Quote g_j_a_i_n Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2020 at 1:09am
I saw the Controls sample and GUI_VisualStudio sample. Looks like I have to handle the WM_CTLCOLOR message to implement dark mode in dialogs. This would work for many controls. But won't work for buttons (Button, Checkbox, Radio buttons). We will have to use CXTPButton::SetTheme for such cases.

Posted this so that it can helps someone.
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.141 seconds.