[6.32] Form title quirks when migrating from 6.20

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #39250
    Support
    Keymaster

      Hello and thank you for screenshots.
      Please compare skinned captions font with font which used in the system (must be equal). If fonts are not equal, please show a screenshot of system font.

      #39309
      Iruau
      Participant

        Hi,

        The skinned caption font is indeed the same as the system font (Tahoma on WinXP).

        Thanks for your time.

        #39898
        Iruau
        Participant

          For the record, I managed to work around that problem by reverting procedure GetCaptionFontSize in acntUtils.pas to the 6.20 version (removing the {$IFDEF TNTUNICODE} part):

          CODE
          function GetCaptionFontSize : integer;
          var
            NonClientMetrics: TNonClientMetrics;
          begin
            NonClientMetrics.cbSize := SizeOf(NonClientMetrics);
            if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, @NonClientMetrics, 0) then
              Result := NonClientMetrics.lfCaptionFont.lfHeight;
            else
              Result := 0;
          end;

          Seems to work fine so far.

          #39911
          Support
          Keymaster

            Why TNTUNICODE part was removed?
            What purpose of this reverting?

            #39945
            Iruau
            Participant

              When compiling 6.32 / 6.40 with TNTUNICODE enabled, there is a problem with SystemParametersInfoW : for an unknown reason it returns a bad value for lfCaptionFont.lfHeight, which makes the title font too big for me (BCB6 + ASkin 6.40 + TNT).

              I found that using SystemParametersInfo instead of SystemParametersInfoW solves the problem (so there is no need of the TNTUNICODE compiler switch here).
              Also, I see no compelling reason to use the W API here because you use only numerical results. Granted, the A and W APIs should theoretically return the same values but in practice they don't, at least in my environment, so I decided to use the correct one and share that with you.

              #39964
              Support
              Keymaster

                Ok, thank you!
                This part of code will be researched more and changes will be added in the next release.

                #40082
                Iruau
                Participant

                  Now works fine in 6.41. Thanks.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.