Print Page | Close Window

Enable theming in CXTPResizePropertySheet' TabCtrl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=22985
Printed Date: 24 November 2024 at 8:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Enable theming in CXTPResizePropertySheet' TabCtrl
Posted By: JoseAngel
Subject: Enable theming in CXTPResizePropertySheet' TabCtrl
Date Posted: 04 April 2016 at 7:45am
I'm working in adding Visual Studio 2015's theming support for TabCtrl.

Doing my tests I realized that CXTPResizePropertySheet's TabCtrl is actually a CTabCtrl and not a CXTPTabCtrl.

Modifying the definition of m_tabCtrl (line 94 of XTPResizePropertySheet.h) from:

CXTPNoFlickerWnd <CTabCtrl> m_tabCtrl;

to

CXTPNoFlickerWnd <CXTPTabCtrl> m_tabCtrl;

is not the solution, because CXTPNoFlickerWnd hides all the theming support of CXTPTabCtrl, so I decided to change it to:

CXTPTabCtrl m_tabCtrl;

To avoid errors, you've to add this lines in XTPResizePropertySheet.cpp:

#include "Controls/Util/XTPGlobal.h"
#include "Controls/Util/XTPControlTheme.h"
#include "Controls/Tab/XTPTabBase.h"
#include "Controls/Tab/XTPTabCtrl.h"


before the call to

#include "Controls/Resize/XTPResizePropertySheet.h"

and all is done. If your TabCtrl has theming support, your PropertySheet's TabCtrl will shows it correctly.

Here the Controls Sample showing dark theme:Wink







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