Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Skin applied to particular dialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skin applied to particular dialog

 Post Reply Post Reply
Author
Message
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Topic: Skin applied to particular dialog
    Posted: 10 April 2008 at 6:01am
Hi
 
If we apply skin effect in application it gets applied to everything .
e.g. All the dialogs i application we show the same skin effect.
Is there a way to apply skin in such a way that only some/particular dialogs  will show the skin effect and others don't
 
I mean i want selectively for the dialogs/other controls to show the skin effect .
Could we do that?
 
Secondly the files used to apply skin .cjstyle files could we edit those files
if yes how to do that.
 
Thanks in advance
Himanshu
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: 10 April 2008 at 6:30am
Hi,
 
Call SetAutoApplyNewWindows(FALSE) and apply windows you only need.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2008 at 7:14am
Hi
 
where to call that function and how to apply for particular windows only.
Back to Top
pijnappel View Drop Down
Groupie
Groupie


Joined: 30 November 2007
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote pijnappel Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2008 at 7:20am
I have a similar problem.

I am using the following code to load the skin:


XTPSkinManager()->SetAutoApplyNewWindows(FALSE);
XTPSkinManager()->SetAutoApplyNewThreads(FALSE);
XTPSkinManager()->LoadSkin(m_strStylePath"));


To assign a window I use:


XTPSkinManager()->ApplyWindow(myWindow.m_hwnd);


The applied dialog is skinned, but the colors of the loaded skin are also applied to the other dialogs. For instance the background of static text controls is different from the default windows skin.

Example of the loaded skin:




Another dialog as it should be:



And that's how it looks like when the other theme is loaded:


Back to Top
xhantt View Drop Down
Newbie
Newbie


Joined: 16 April 2008
Location: Argentina
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote xhantt Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2008 at 11:37am
In my case if I set this options before any other operation

XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics | xtpSkinApplyFrame );


it seems to work.

But I don't know if this is the correct solution, I'm glad to know other approaches.
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: 16 April 2008 at 2:47pm
Yes, its only right solution.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
pijnappel View Drop Down
Groupie
Groupie


Joined: 30 November 2007
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote pijnappel Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2008 at 4:34am

That worked...thanks

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