![]() |
Change Pane Vertical font ? |
Post Reply ![]() |
Author | |
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() 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 ? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, Try dp.GetPaintManager()->GetPanelPaintManager()->SetFontIndirect(..);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
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 ? |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
After these lines also switch:
pPanelPaintManager->SetAppearance(xtpTabAppearancePropertyPageFlat);
pPanelPaintManager->SetColor(xtpTabColorOffice2003); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
Now theme is working for tabs. Hearty Thanks Oleg
![]() Is getting Vertical font from CXTPDrawHelpers is the intended behaviour for XT ? ![]() Whoop! ![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
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 ![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Sorry, there no global manages for fonts :(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
kanitamildasan ![]() Senior Member ![]() ![]() Joined: 01 February 2006 Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
In future, if Codejock consider my request it will be very helpful for us. (may help other customers as well) I ![]() ![]() |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |