Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Enable theming in CXTPResizePropertySheet' TabCtrl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Enable theming in CXTPResizePropertySheet' TabCtrl

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


Joined: 21 March 2006
Location: Spain
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote JoseAngel Quote  Post ReplyReply Direct Link To This Post Topic: Enable theming in CXTPResizePropertySheet' TabCtrl
    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




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.125 seconds.