Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Tabs font
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tabs font

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


Joined: 04 September 2009
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote feffe Quote  Post ReplyReply Direct Link To This Post Topic: Tabs font
    Posted: 28 December 2009 at 12:04pm
 
Hi,
 
I'd like to change ribbon tabs font.
 
This code, put in CMainFrame::OnCreate, does not work.
 

LOGFONT lf;
CXTPRibbonTheme *pTheme = (CXTPRibbonTheme*)m_pRibbonBar->GetPaintManager();
theApp.m_font.GetLogFont(&lf);
pTheme->GetTabPaintManager()->SetFontIndirect(&lf);
 
I think it is due to the fact that I'm using a skin.
So, I set a timer and AFTER the window is opened, I set tabs font. 
 
But I think it's not a good solution. So, how can I change tabs font?
Back to Top
feffe View Drop Down
Groupie
Groupie


Joined: 04 September 2009
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote feffe Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2009 at 12:44pm

Another question....

If I try to adopt the solution above (using the timer) and I also try to set the font for docking panes:

m_paneManager.GetPaintManager()->UseOfficeFont(TRUE);

the commandbars text (eg, groups caption) becomes... vertical.

Why?

Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2009 at 4:35am

I'd derive CXTPRibbonBar and do that in the constructor. Otherwise you need to redraw the entire ribbon before the font change will have effect.

PokerMemento - http://www.pokermemento.com/
Back to Top
feffe View Drop Down
Groupie
Groupie


Joined: 04 September 2009
Status: Offline
Points: 56
Post Options Post Options   Thanks (0) Thanks(0)   Quote feffe Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2009 at 4:51am

 

I use "OnRecalcLayout" and it seems to work...

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