Print Page | Close Window

How to apply dark theme to dialog boxes

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=24008
Printed Date: 22 December 2024 at 6:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to apply dark theme to dialog boxes
Posted By: g_j_a_i_n
Subject: How to apply dark theme to dialog boxes
Date 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.



Replies:
Posted By: g_j_a_i_n
Date 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.



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