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

Different schemes

 Post Reply Post Reply
Author
Message Reverse Sort Order
Moritz View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2005
Location: Germany
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Moritz Quote  Post ReplyReply Direct Link To This Post Topic: Different schemes
    Posted: 05 January 2009 at 1:05pm

Hello Oleg,

what can I do to enable CXTButton to show the new theme? What kind of sense makes such a function if it is not fully supported?

Greetings, Moritz Leutenecker

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: 15 December 2008 at 1:45am
Hi,
Sorry only CButton can catch new skin  :( CXTPButton can't
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
gmail View Drop Down
Groupie
Groupie


Joined: 24 February 2008
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote gmail Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2008 at 12:24pm
In your sample 'Skin Controls' (DialogSample.cpp file) there is a section which states:

CDialog::OnInitDialog();
   
    CXTPSkinManager* pSkinManager = XTPSkinManager();

    CXTPSkinManagerSchema* pSchema = pSkinManager->CreateSchema(m_strStylesPath + _T("WinXP.Luna.cjstyles"), _T("NormalHomestead.ini"));
    pSkinManager->SetWindowTheme(GetSafeHwnd(), pSchema);
    CMDTARGET_RELEASE(pSchema);

    pSchema = pSkinManager->CreateSchema(m_strStylesPath + _T("WinXP.Royale.cjstyles"), _T("NormalRoyale.ini"));
    pSkinManager->SetWindowTheme(GetDlgItem(IDC_BUTTON_BLUE)->GetSafeHwnd(), pSchema);
    CMDTARGET_RELEASE(pSchema);

    pSchema = pSkinManager->CreateSchema(m_strStylesPath + _T("Vista.cjstyles"), _T("NormalBlue.ini"));
    pSkinManager->SetWindowTheme(button.GetSafeHwnd(), pSchema);
    CMDTARGET_RELEASE(pSchema);
}

If we replace GetDlgItem(IDC_BUTTON_BLUE) with b_Button (CXTPButton variable), those schemes doesn't work anymore (it loads application default theme)? How can we overcome this so every CXTPButton has different scheme (like your example with ordinary CButton)? Thanks for replying...
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.