Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-7155

KeyView2: CreateFont call with FIXED_PITCH param does not return fixed width characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.5
    • Win32SS
    • None

    Description

      KeyView2.exe from Petzolds CDROM doesnt work as expected.
      The text is not properly drawn.
      These are my findings:

      Text is being painted via the following calls:
      static TCHAR szTop[] = TEXT ("Message Key Char ")
      static TCHAR szUnd[] = TEXT ("_______ ___ ____ ")
      SelectObject (hdc, CreateFont (0, 0, 0, 0, 0, 0, 0, 0, dwCharSet, 0, 0, 0, FIXED_PITCH, NULL)) ;
      TextOut (hdc, 0, 0, szTop, lstrlen (szTop)) ;
      TextOut (hdc, 0, 0, szUnd, lstrlen (szUnd)) ;

      It should create a FIXED_PITCH, that means, forcing to have each letter the same width, and hence the underscores fits the letters.

      But as you can see in the screenshot, it doesn't happen.

      Attachments

        1. keyview2.png
          keyview2.png
          58 kB
        2. KeyView2.exe
          24 kB
        3. KeyView2.c
          8 kB

        Issue Links

          Activity

            People

              bug zilla Bug Zilla
              vicmarcal vicmarcal
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: