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

Selectively Skin Controls

 Post Reply Post Reply
Author
Message
IRMark View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote IRMark Quote  Post ReplyReply Direct Link To This Post Topic: Selectively Skin Controls
    Posted: 09 April 2010 at 2:25pm
Hi Everyone,

I'm using Xtreeme Toolkit Pro 13.3.

I've been trying to figure out if it was possible to only skin certain controls in an application as opposed to skinning the entire application?

It seems that no matter what I do the entire application get's skinned.

For some more information on what I am doing, imagine having a dialog where you want to skin the control, or some of the controls, but leave the main application windows unskinned? Or perhaps doing the same for a few CWnd's on the view?

Thanks in advance!

mark
Back to Top
IRMark View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote IRMark Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2010 at 12:24pm
Hi,

Sorry to bump this, but does anyone have any ideas about this?


Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2010 at 12:42pm
You can set SetAutoApplyNewWindows to False and remove
XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() & ~xtpSkinApplyColors);

Now you can manually apply skin to windows you only need.
Back to Top
IRMark View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote IRMark Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2010 at 1:29pm
Originally posted by SuperMario SuperMario wrote:

You can set SetAutoApplyNewWindows to False and remove
XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() & ~xtpSkinApplyColors);

Now you can manually apply skin to windows you only need.


Hi SuperMario,

Thanks for the reply.

This is the code that I have been trying to use:

XTPSkinManager()->SetAutoApplyNewWindows(FALSE);
XTPSkinManager()->SetAutoApplyNewThreads(FALSE);
XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() & ~xtpSkinApplyColors);
XTPSkinManager()->LoadSkin(strSkinFullPath, strSubStyle);

Then I loop through the windows that I want to apply the skin to and do the following:

CXTPSkinManager* pSkinManager = XTPSkinManager();
        ASSERT(pSkinManager);
        if (pSkinManager)
        {
            pSkinManager->ApplyWindow(pWnd->m_hWnd);
        }

But none of the windows theme at all? I'm sure this is possible and I'm just missing something simple? Anymore hints?

Thanks.

Back to Top
IRMark View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote IRMark Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2010 at 10:44am
Sorry to bump this thread but it's been a while and I have not gotten a response.

Is what I'm looking for possible?

Thanks.
Back to Top
IRMark View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote IRMark Quote  Post ReplyReply Direct Link To This Post Posted: 21 June 2010 at 12:16pm
Anyone?
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: 23 June 2010 at 5:05am
Seems should work...

What kind of windows did you try to skin ? if you tried button and don't see result, check what value returned by LoadSkin - if FALSE, maybe something with skin path.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
IRMark View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2006
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote IRMark Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2010 at 12:16pm
Hi Oleg,

Thanks for getting back to me.

I am trying to selectively skin a button (an CXTPButton actually), but it doesn't seems to work. LoadSkin() returns TRUE.

I have tested with a few other controls and some of them "almost work". For example the drop downs for ComboBoxes will skin but the main ComboBox itself won't.

If I don't remove the xtpSkinApplyColors then things will work, but all of the application will be skinned, which isn't what I want. I'm trying to show a preview of the skin that has been selected but I just can't get it working.

Anymore tips?


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: 23 June 2010 at 3:08pm
yes CXTPButton and some other that use CXTPWinThemeWrapper can't be individually turned on/off :( they use global CXTPWinThemeWrapper.
Replace it to system CButton.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.156 seconds.