Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Shortcut Bar
  New Posts New Posts RSS Feed - Shortcutbar font change ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Shortcutbar font change ?

 Post Reply Post Reply
Author
Message
kanitamildasan View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01 February 2006
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote kanitamildasan Quote  Post ReplyReply Direct Link To This Post Topic: Shortcutbar font change ?
    Posted: 07 March 2009 at 4:49am
Hi, How to change the fonts of red-marked items for all supported themes ?


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

Joined: 01 February 2006
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote kanitamildasan Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2009 at 1:00am
Hi, I derived from CXTPShortcutBarOffice2003Theme and overrided the RefreshMetrics.

void MYShortCutBarPaintManager::RefreshMetrics()
{
    CXTPShortcutBarOffice2003Theme::RefreshMetrics();

    LOGFONT lf1,lf2,lf3;

    m_fntPaneCaption.GetLogFont(&lf1);
    m_fntPaneItemCaption.GetLogFont(&lf2);
    m_fntText.GetLogFont(&lf3);

    _tcscpy(lf1.lfFaceName,_T("MY FONT"));
    _tcscpy(lf2.lfFaceName,_T("MY FONT"));
    _tcscpy(lf3.lfFaceName,_T("MY FONT"));

    m_fntPaneCaption.DeleteObject();   
    m_fntPaneItemCaption.DeleteObject();   
    m_fntText.DeleteObject();   

    m_fntPaneCaption.CreateFontIndirect(&lf1);
    m_fntPaneItemCaption.CreateFontIndirect(&lf2);
    m_fntText.CreateFontIndirect(&lf3);

}

Is this the right way to do it ?

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: 09 March 2009 at 2:56am
Hi,
 
Yes, its best way to change it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kanitamildasan View Drop Down
Senior Member
Senior Member
Avatar

Joined: 01 February 2006
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote kanitamildasan Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2009 at 3:21am
I just wondered, it didnt come with some kind of SetXXXMethods() (ex SetPaneCaptionFont())

Thanks oleg
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.