Print Page | Close Window

Program Icon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=7940
Printed Date: 28 September 2024 at 1:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Program Icon
Posted By: jimmy
Subject: Program Icon
Date Posted: 05 September 2007 at 10:16am
Hello,

Using in dialog application

CMyDialog::CMyDialog()
{
    XTPSkinManager()->SetApplyOptions(xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMetrics);

    CString strSkinFile;
    strSkinFile = VaranCommon::TheProgrammInfo().m_strProgramPath;
    strSkinFile += "Styles\\iTunes";
    // if (Common::Path::IsFileExisting(strSkinFile))
    if (XTPSkinManager()->LoadSkin(strSkinFile, "Normalitunes.INI"))
        InitTheme(NULL, xtpThemeNativeWinXP);
}

void InitTheme(CXTPDockingPaneManager *pPaneManager, XTPPaintTheme Theme)
{
    SetTheme(Theme, pPaneManager);
    CXTPPopupBar::m_dMaxWidthDivisor = 0.9;

    // m_pMTIClientWnd->GetPaintManager()->SetLayout(xtpTabLayoutAutoSize);

    XTP_COMMANDBARS_ICONSINFO* pIconsInfo = XTPPaintManager()->GetIconsInfo();
    pIconsInfo->bUseDisabledIcons = FALSE;
    pIconsInfo->bIconsWithShadow = TRUE;
    pIconsInfo->bUseFadedIcons = TRUE;

}

static void SetTheme(XTPPaintTheme Theme, CXTPDockingPaneManager *pPaneManager)
{
    switch(Theme)
    {
    case xtpThemeOfficeXP:        // Office XP theme.
        CXTPPaintManager::SetTheme(xtpThemeOfficeXP);
        if (pPaneManager)
            pPaneManager->SetTheme(xtpPaneThemeOffice);
        break;
    case xtpThemeOffice2000:        // Office 2000 theme.
        CXTPPaintManager::SetTheme(xtpThemeOffice2000);
        if (pPaneManager)
            pPaneManager->SetTheme(xtpPaneThemeDefault);
        break;
    case xtpThemeOffice2003:        // Office 2003 theme.
        CXTPPaintManager::SetTheme(xtpThemeOffice2003);   
        if (pPaneManager)
            pPaneManager->SetTheme(xtpPaneThemeOffice2003);
        break;
        // case xtpThemeNativeWinXP:    // Windows XP themes support.
    default:
        CXTPPaintManager::SetTheme(xtpThemeNativeWinXP);
        if (pPaneManager)
            pPaneManager->SetTheme(xtpPaneThemeNativeWinXP);
        break;
    }
    if (pPaneManager)
        pPaneManager->RedrawPanes();
}

if skinning file (or directory) is NOT available, the dialog draw correct icon.
But if i use skinning, there was a wrong icon.

    Jimmy




Replies:
Posted By: Oleg
Date Posted: 05 September 2007 at 10:19am
Hi,
 
What code you use to set icon ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Source
Date Posted: 05 September 2007 at 1:23pm
Can you also attach the skinning file that you use ?
Thanks.


Posted By: jimmy
Date Posted: 10 September 2007 at 8:19am
Hello,

I've change
SetIcon(hIcon, TRUE); to SetIcon(hIcon, FALSE);
And now it work.
I use iTune skinns from CodeJock samples.

  Jimmy




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