Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Program Icon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Program Icon

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: Program Icon
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2007 at 10:19am
Hi,
 
What code you use to set icon ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Source View Drop Down
Senior Member
Senior Member


Joined: 19 June 2006
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote Source Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2007 at 1:23pm
Can you also attach the skinning file that you use ?
Thanks.
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post 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

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