Print Page | Close Window

CXTPHeaderCtrl::SetTheme needs love

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=24368
Printed Date: 19 May 2024 at 4:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPHeaderCtrl::SetTheme needs love
Posted By: xsensordev
Subject: CXTPHeaderCtrl::SetTheme needs love
Date Posted: 07 March 2023 at 3:59pm
This method could use some updated theme support. The default themes are very out-of-date.

BOOL CXTPHeaderCtrl::SetTheme(XTPControlTheme eTheme)
{
    CMDTARGET_RELEASE(m_pTheme);

    switch (eTheme)
    {
        case xtpControlThemeFlat:
        case xtpControlThemeUltraFlat:
        case xtpControlThemeOffice2000:
        case xtpControlThemeOfficeXP: m_pTheme = new CXTPHeaderCtrlThemeOfficeXP; break;

        case xtpControlThemeOffice2003: m_pTheme = new CXTPHeaderCtrlThemeOffice2003; break;

        case xtpControlThemeVisualStudio2005:
        case xtpControlThemeVisualStudio2008:
        case xtpControlThemeVisualStudio2010:
        case xtpControlThemeNativeWinXP:
            m_pTheme = new CXTPHeaderCtrlThemeExplorer;
            m_pTheme->SetDrawStyle(HDR_XTP_WINDEF | HDR_XTP_HOTTRACKING | HDR_XTP_SORTARROW, this);
            break;

        case xtpControlThemeResource: m_pTheme = new CXTPHeaderCtrlThemeResource; break;

        case xtpControlThemeDefault:
        default: m_pTheme = new CXTPHeaderCtrlTheme; break;
    }

    RefreshMetrics();

    return (m_pTheme != NULL);
}



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