Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to change theme in menu from Designer
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change theme in menu from Designer

 Post Reply Post Reply
Author
Message Reverse Sort Order
Maye Johnson View Drop Down
Groupie
Groupie


Joined: 16 October 2004
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maye Johnson Quote  Post ReplyReply Direct Link To This Post Topic: How to change theme in menu from Designer
    Posted: 20 January 2005 at 7:30am
That fixed it!  I was already doing that, but in OnCreate(), so I moved that code to my routine that sets the paint theme.  So obvious to me now ... thanks for the awesome and fast help!
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: 20 January 2005 at 1:15am
GetCommandBars()->GetPaintManager()->GetIconsInfo()-&g t;bUseDisabledIcons = TRUE;
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Maye Johnson View Drop Down
Groupie
Groupie


Joined: 16 October 2004
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maye Johnson Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2005 at 12:37pm
I'm using v9.51, Windows XP, and Visual Studio v6.0.
Back to Top
Maye Johnson View Drop Down
Groupie
Groupie


Joined: 16 October 2004
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maye Johnson Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2005 at 3:01am
I just came across the same problem.  Did you find a solution?

Originally posted by rberlin rberlin wrote:

I tried this and it seems to work except for the disabled icons.  The quality of the disabled icons gets really bad.  Is this happening in your code.  If you add this command to the designer example, you will see what I mean.

I tried setting use "Disable Icons" and it did not seem to help.  Not sure what this actually does (I believe it may use the icons from the designer versus on the fly). 

Do you have a solution to make them look better or use the disabled icons from the designer after setting a new theme?

 

Back to Top
rvoith View Drop Down
Groupie
Groupie
Avatar

Joined: 03 July 2003
Location: Norway
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote rvoith Quote  Post ReplyReply Direct Link To This Post Posted: 26 July 2004 at 1:41am
Sorry for late answer! Been on a summer holiday! Yep, I noticed the same!
Best regards,
Bob
Proud Programmer!
Back to Top
rberlin View Drop Down
Newbie
Newbie


Joined: 17 July 2004
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote rberlin Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2004 at 5:33pm

I tried this and it seems to work except for the disabled icons.  The quality of the disabled icons gets really bad.  Is this happening in your code.  If you add this command to the designer example, you will see what I mean.

I tried setting use "Disable Icons" and it did not seem to help.  Not sure what this actually does (I believe it may use the icons from the designer versus on the fly). 

Do you have a solution to make them look better or use the disabled icons from the designer after setting a new theme?

 

Back to Top
rvoith View Drop Down
Groupie
Groupie
Avatar

Joined: 03 July 2003
Location: Norway
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote rvoith Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2004 at 1:37am

I received an answer from Oleg C.:

GetCommandBars()->SetPaintManager(CXTPPaintManager::Creat eTheme(xtpThemeOffice2000));

Best regards,
Bob
Proud Programmer!
Back to Top
rvoith View Drop Down
Groupie
Groupie
Avatar

Joined: 03 July 2003
Location: Norway
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote rvoith Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2004 at 2:30am

I am struggeling with theme-switching in command bars loaded from Designer created XCB files. I know I can set the theme with Command Bar Designer in Command Bars - > Settings -> Paint Manager. This works and change the theme. However, I would also be able to switch the theme at runtime, much like other samples in the toolkit. Unfortunately I can't get my test app. to repaint the command bar .

Let say I set the initial theme to Office2003 (xtpThemeOffice2000) in XCB file, and recompile. The app. start up with the correct theme. In my test app. I have added a menu handler method for one of the default themes, such as;

void CMainFrame::OnThemeDefault()

{

m_paneManager.SetTheme(xtpPaneThemeDefault);

CXTPPaintManager::SetTheme(xtpThemeOffice2000);

// GetCommandBars()->GetPaintManager()->SetTheme(xtpTheme Office2000);

RecalcLayout(FALSE);

GetCommandBars()->RedrawCommandBars();

RedrawWindow();

}

As you see I have tested a few approaches. None of them repaint the command bar properly. I suspect I have to connect the default paint manager to the command bar, but haven't succeeded. Any ideas ?

Best regards,
Bob
Proud Programmer!
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.109 seconds.