Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Change Pane Vertical font ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change Pane Vertical font ?

 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: Change Pane Vertical font ?
    Posted: 11 March 2009 at 8:46am
Hi, How to change the vertical font of DockPane ?




I tried the similar method from this post by overriding RefreshMetrics() of CXTPTabPaintManager
and set this paintmanager as dockingpane's tabpaintmanager but it didnt helped me ?





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: 12 March 2009 at 2:10am

Hi,

 
Try dp.GetPaintManager()->GetPanelPaintManager()->SetFontIndirect(..);
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: 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 ?



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: 13 March 2009 at 2:03am
After these lines also switch:
 
 pPanelPaintManager->SetAppearance(xtpTabAppearancePropertyPageFlat);
 pPanelPaintManager->SetColor(xtpTabColorOffice2003);
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: 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 here.
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: 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
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: 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.

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: 16 March 2009 at 8:13am
Sorry, there no global manages for fonts :(
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: 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 request it will be very helpful for us. (may help other customers as well)

I XT and Thanks Oleg for your support

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.