Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Applying Themes to Dialogs
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Applying Themes to Dialogs

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

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Topic: Applying Themes to Dialogs
    Posted: 01 February 2007 at 6:07am
Hi All,
I've started converting an existing VC6 application to use the Ribbon Bar.  So far so good.
 
The problem is that now, that the dialog boxes that are displayed look dated and old compared to the new interface.  So my question is, is there an easy way to apply the current theme to any dialog or property sheet?
 
If so how would I go about it..
 
Many thanks
 
Wayne
Gibbo
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: 01 February 2007 at 9:05am
Hi,
 
Check samples from SkinFramework folder, may be it will work for you.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
gibbo View Drop Down
Groupie
Groupie
Avatar

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2007 at 4:12am

Hi,

The SkinFramework looks good.  But will it work with the Ribbon theme and the themes it has, I.E. Blue, Black, Silver, Aqua ?
 
Thanks
 
 
Gibbo
Back to Top
gibbo View Drop Down
Groupie
Groupie
Avatar

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 6:58am
Any Ideas???
Gibbo
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 March 2007 at 7:27am
Hi,
Yes, it will work.
 
Blue theme in Office2007.cjstyles  and black and silver in Vista.cjstyles
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
gibbo View Drop Down
Groupie
Groupie
Avatar

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 8:13am
Firstly thanks for replying..
 
Sorry I don't quite understand what you mean, do you have a code fragment?
Gibbo
Back to Top
gibbo View Drop Down
Groupie
Groupie
Avatar

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 8:57am
Ok, did some searching..  Now understand a bit more :D
 
I have to use the following:
 
   XTPSkinManager()->LoadSkin(pTheme->strResourcePath, pThemeInfo->csIniFileName);
 
Is there anyway that the Styles can be loaded from a resource instead of a file?
Gibbo
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 1:33pm
Originally posted by gibbo gibbo wrote:

Is there anyway that the Styles can be loaded from a resource instead of a file?


Add #include "SkinFramework\Styles\Office2007\Office2007.rc" to your .rc2 file.

You may have to add ...\Source\SkinFramework\Styles\Office2007 to your source directories.

Then load the skin from your executable:


CString sExeName = AfxGetApp()->m_pszExeName;
sExeName += _T(".exe");

LoadSkin (sExeName, ...)

Codejock support
Back to Top
jkaufmann View Drop Down
Newbie
Newbie


Joined: 18 December 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote jkaufmann Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2007 at 4:24pm
I have a problem with applying themes to dialogs, so I figured this was the best thread to post...

I have a dialog running in a CFormView running great except that whenever I right click on a CEdit, the menu that comes up is the old and outdated style.  The menu is the default one that just has Cut/Copy/Paste/etc.  I'd rather not have to override the menu popup w/ my own because this issue is in every CEdit in my application.  Any suggestions?

OK, I just looked and the same unskinned popup menu shows up for the CEdit's that are embedded into CXTPPropertyGrid too.
Back to Top
gibbo View Drop Down
Groupie
Groupie
Avatar

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2007 at 4:56am
Hi ABuenger,
Thanks for the information.  A few small tweaks to the Skin Resources and I now have the Ribbonbars and skins working .
 
Cheers
 
Gibbo
Gibbo
Back to Top
gibbo View Drop Down
Groupie
Groupie
Avatar

Joined: 04 January 2007
Location: United Kingdom
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibbo Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2007 at 5:15am
Hi
Just a thought, why isn't there an example of how to incorporate skins and ribbonbars..  Think it would help a lot of newbies..
 
Gibbo
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.141 seconds.