SourceForge has been redesigned. Learn more.
Close

#314 tk8.4.19 (and later) WIN32 menu font support

closed-fixed
5
2011-03-24
2011-03-24
John Wehle
No

Enclosed is a patch which allows tk8.4.19 when built with newer Microsoft
compilers (MSVC 2008) to correctly get the menu font information. The
problem is that the size of ncMetrics is larger when using the newer compilers
causing the SystemParametersInfo call to fail on win2k/win2k3/winxp. This
results in the menu font being ill defined (e.g. Arial 396 which is huge).

Changes:

1) In SetDefaults adjust the size of ncMetrics when running on older
operating systems as describe in the remarks section of:

http://msdn.microsoft.com/en-us/library/ff729175\(v=VS.85).aspx

Notes:

1) It appears from looking at the tk8.5.9 and tk8.6b1 source code that
the problem is also present in those releases.

2) This may require work to support older compilers which are missing
iPaddedBorderWidth.

Discussion

  • John Wehle

    John Wehle - 2011-03-24

    patch

     
  • Jan Nijtmans

    Jan Nijtmans - 2011-03-24

    Thanks! I will have a look at this

     
  • Jan Nijtmans

    Jan Nijtmans - 2011-03-24

    Fixed on core-8-4-branch, core-8-5-branch and trunk (modified a little bit such that compiling with older tools and running with newer tools should works as well.....)

    This Issue can be closed

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2011-03-24
    • status: open --> closed-fixed
     
  • Pat Thoyts

    Pat Thoyts - 2011-03-25

    In 8.5+ this tkWinMenu code should be using TkMenuFont to get the font to draw with. Then we would have the font identification code in one place. I should have noticed that when I rolled in the themeing named font stuff.