Print Page | Close Window

Selectively Skin Controls

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=16570
Printed Date: 24 September 2024 at 3:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Selectively Skin Controls
Posted By: IRMark
Subject: Selectively Skin Controls
Date 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



Replies:
Posted By: IRMark
Date Posted: 14 April 2010 at 12:24pm
Hi,

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




Posted By: SuperMario
Date 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.


Posted By: IRMark
Date 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.



Posted By: IRMark
Date 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.


Posted By: IRMark
Date Posted: 21 June 2010 at 12:16pm
Anyone?


Posted By: Oleg
Date 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


Posted By: IRMark
Date 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?




Posted By: Oleg
Date 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



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