Print Page | Close Window

Change Pane Vertical font ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=13646
Printed Date: 13 May 2025 at 7:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Change Pane Vertical font ?
Posted By: kanitamildasan
Subject: Change Pane Vertical font ?
Date Posted: 11 March 2009 at 8:46am
Hi, How to change the vertical font of DockPane ?




I tried the similar method from https://forum.codejock.com/forum_posts.asp?TID=13604&PID=46376#46376 - this post by overriding RefreshMetrics() of CXTPTabPaintManager
and set this paintmanager as dockingpane's tabpaintmanager but it didnt helped me ?








Replies:
Posted By: Oleg
Date Posted: 12 March 2009 at 2:10am

Hi,

 
Try dp.GetPaintManager()->GetPanelPaintManager()->SetFontIndirect(..);


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


Posted By: kanitamildasan
Date Posted: 12 March 2009 at 5:00am
Thanks Oleg,

void CXTPTabPaintManager::SetFontIndirect(LOGFONT* pLogFont, BOOL bUseStandardFont /*= FALSE*/)
{
 
...
...

    STRCPY_S(pLogFont->lfFaceName, LF_FACESIZE, CXTPDrawHelpers::GetVerticalFontName(FALSE));
    pLogFont->lfOrientation = 900;
    pLogFont->lfEscapement = 2700;
    pLogFont->lfHeight = pLogFont->lfHeight < 0 ? __min(-11, pLogFont->lfHeight) : pLogFont->lfHeight;
    pLogFont->lfWeight = m_bBoldNormal ? FW_BOLD : FW_NORMAL;
    VERIFY(m_fntVerticalNormal.CreateFontIndirect(pLogFont));

    pLogFont->lfWeight = FW_BOLD;
    VERIFY(m_fntVerticalBold.CreateFontIndirect(pLogFont));
}

CXTPTabPaintManager gets the vertical font from CXTPDrawHelpers ? So i used the following code in my app

void MyTabPaintManager::RefreshMetrics()
{
    CXTPTabPaintManager::RefreshMetrics();

    LOGFONT lf1,lf2,lf3,lf4;

    m_fntNormal.GetLogFont(&lf1);
    m_fntBold.GetLogFont(&lf2);
    m_fntVerticalNormal.GetLogFont(&lf3);
    m_fntVerticalBold.GetLogFont(&lf4);

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

    m_fntNormal.DeleteObject();  
    m_fntBold.DeleteObject();  
    m_fntVerticalNormal.DeleteObject();  
    m_fntVerticalBold.DeleteObject();  

    m_fntNormal.CreateFontIndirect(&lf1);
    m_fntBold.CreateFontIndirect(&lf2);
    m_fntVerticalNormal.CreateFontIndirect(&lf3);
    m_fntVerticalBold.CreateFontIndirect(&lf4);
}

m_paneManager.SetTheme(xtpPaneThemeOffice2003);   
m_paneManager.GetPaintManager()->SetPanelPaintManager(new MyTabPaintManager());

When i post the question i didnt get the Vertical font because i accidentally set the theme for panemanager after changing the TabPaintManager :( 
Now i am able to get the Vertical font but Office 2003 theme is not working for Tabs ?





Posted By: Oleg
Date Posted: 13 March 2009 at 2:03am
After these lines also switch:
 
 pPanelPaintManager->SetAppearance(xtpTabAppearancePropertyPageFlat);
 pPanelPaintManager->SetColor(xtpTabColorOffice2003);


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


Posted By: kanitamildasan
Date Posted: 13 March 2009 at 2:39am
Now theme is working for tabs. Hearty Thanks Oleg ,

Is getting Vertical font from CXTPDrawHelpers is the intended behaviour for XT ?

Whoop! All we need is change the font. So i posted a Feature request http://forum.codejock.com/forum_posts.asp?TID=13659 - here.


Posted By: Oleg
Date Posted: 13 March 2009 at 6:59am
Hi,
Not all fonts can be drawn vertically. so we have stick to some that can. If you change it - test in windows 95 to be sure your font can do it.


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


Posted By: kanitamildasan
Date Posted: 13 March 2009 at 7:35am
Hi Oleg,

Our fonts works without problem in Win98. But I am confused about How can i make XT to use my font for Vertical text in a simple straight forward way rather than overiding theme(every one of them ) to change the font.



Posted By: Oleg
Date Posted: 16 March 2009 at 8:13am
Sorry, there no global manages for fonts :(

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


Posted By: kanitamildasan
Date Posted: 16 March 2009 at 8:51am
Originally posted by oleg oleg wrote:

Sorry, there no global manages for fonts :(


In future, if Codejock consider my http://forum.codejock.com/forum_posts.asp?TID=13659 - request it will be very helpful for us. (may help other customers as well)

I XT and Thanks Oleg for your support




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