Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to change docking pane font size?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change docking pane font size?

 Post Reply Post Reply
Author
Message
nclee View Drop Down
Newbie
Newbie
Avatar

Joined: 19 June 2014
Location: Korea
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote nclee Quote  Post ReplyReply Direct Link To This Post Topic: How to change docking pane font size?
    Posted: 19 June 2014 at 12:46am
Hi,

I'm using v16.2.4.

pane font size

I'm Using Office2013 theme, but pane font size is too large.

How to change font size??

Please...




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

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 14 January 2015 at 12:41pm
We have the same issue and I'm working on it now. I have found the m_nFontSize member of the XTPDockingPaneThemeOffice2013 object. We subclass from the class but setting the value in the ctor is useless as CJ overwrites it later when RefreshMetrics is called.

The RefreshMetrics method is virtual and in that method the font height is calculated by XTPCalcLogFontHeight, which is not a method that can be overridden. It is passed the theme's m_nFontSize member. That member is not set in the constructor and the only place I found it being set is in RefreshMetrics via a call to CXTPResourceImages::GetImageInt.

Of course there is no "SetImageInt". The value returned is 16 and XTPCalcLogFontHeight scales it to 21 (on my 96 dpi system). I have not found a way to "override" that setting.

I can stop in debug and set lfHeight back to what we get when running with a 2007/2010 paint theme and that gives us a better result.

At this point there appears to be only two ways to work this out. Implement RefreshMetrics and copy the CJ code, including XTPCalcLogFontHeight and don't call "pImages->GetImageInt(...,_T"FontSize") and just set the size to 12 (same as 2007/2010). This assumes I can get to all the other APIs that calls.

Alternatively a strategically placed call to SetCaptionFontIndirect might also solve the problem.


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

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 14 January 2015 at 12:57pm
Don't waste time calling SetCaptionFontIndirect. The numerous calls to RefreshMetrics still call SetCaptionFontIndirect and even though I have set my own font, CJ completely ignores that fact.

I'm not even sure why SetCaptionFontIndirect exists for this theme.
Back to Top
mcmastl View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 April 2015
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote mcmastl Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2015 at 1:26pm
We have informed our development team of the issue and will be looking into it.  Thank you for bringing this to our attention.  If the issue has been resolved please let us know.  Thank you.
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (1) Thanks(1)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2015 at 1:43pm
Just a quick note - SetCaptionFontIndirect seems to work as expected for me in XTP v17 beta 1.
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.359 seconds.