Print Page | Close Window

Shortcutbar font change ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Shortcut Bar
Forum Description: Topics Related to Codejock Shortcut Bar
URL: http://forum.codejock.com/forum_posts.asp?TID=13604
Printed Date: 26 April 2024 at 6:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Shortcutbar font change ?
Posted By: kanitamildasan
Subject: Shortcutbar font change ?
Date Posted: 07 March 2009 at 4:49am
Hi, How to change the fonts of red-marked items for all supported themes ?





Replies:
Posted By: kanitamildasan
Date 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 ?



Posted By: Oleg
Date Posted: 09 March 2009 at 2:56am
Hi,
 
Yes, its best way to change it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: kanitamildasan
Date Posted: 09 March 2009 at 3:21am
I just wondered, it didnt come with some kind of SetXXXMethods() (ex SetPaneCaptionFont())

Thanks oleg



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net