Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Font problems on 9x vs NT kernels (please help)

Font problems on 9x vs NT kernels (please help)

Scheduled Pinned Locked Moved System Admin
helpvisual-studioquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jason Hihn
    wrote on last edited by
    #1

    I'm using a layout class, which I think is only partially my problem...But here's waht I;ve got. I have a program that desires to be proportional regardless of window size. So, I have a layout class that auto-sizes the controls for me. That works great. The problem comes in when I change the font size (to remain proportional) for the CWnds that make up the program's interface. Under 9x, it works fine. I can drag windows over the interface and everything stays intact. When I drag a window over the NT version, all the CWnds are re-drawn in the system's fail-safe font (system, 8pt.) To nail down this issue, I have the CWnds report to me their font info. Under 9x, they always report the right info. Under NT, they give me garbage for the font name. So then set the font correctly. Now it reports the right fonts, but it still draws them in the system's failsafe font. Right now I have a thread on a timer to fix this, but it is still sloppy looking between the refresh intervals. As far as I can tell, the correct font info is set for the CWnd (using WM_SETFONT) but I have no idea why when it's redrawn automatically that it uses the system's fail-safe font. Can anyone please help me? Has anyone seen this?

    B 1 Reply Last reply
    0
    • J Jason Hihn

      I'm using a layout class, which I think is only partially my problem...But here's waht I;ve got. I have a program that desires to be proportional regardless of window size. So, I have a layout class that auto-sizes the controls for me. That works great. The problem comes in when I change the font size (to remain proportional) for the CWnds that make up the program's interface. Under 9x, it works fine. I can drag windows over the interface and everything stays intact. When I drag a window over the NT version, all the CWnds are re-drawn in the system's fail-safe font (system, 8pt.) To nail down this issue, I have the CWnds report to me their font info. Under 9x, they always report the right info. Under NT, they give me garbage for the font name. So then set the font correctly. Now it reports the right fonts, but it still draws them in the system's failsafe font. Right now I have a thread on a timer to fix this, but it is still sloppy looking between the refresh intervals. As far as I can tell, the correct font info is set for the CWnd (using WM_SETFONT) but I have no idea why when it's redrawn automatically that it uses the system's fail-safe font. Can anyone please help me? Has anyone seen this?

      B Offline
      B Offline
      Brian V Shifrin
      wrote on last edited by
      #2

      You would not be by any chance creating font on the stack would you? void SetPropFont() { CFont font; font.Create(xxx,xx,0x,6) SetFont(&font); }

      J 1 Reply Last reply
      0
      • B Brian V Shifrin

        You would not be by any chance creating font on the stack would you? void SetPropFont() { CFont font; font.Create(xxx,xx,0x,6) SetFont(&font); }

        J Offline
        J Offline
        Jason Hihn
        wrote on last edited by
        #3

        I was... but I fixed that. Now I dereference a pointer to a font that always exists (so I can adjust the CFont at runtime), and it still breaks ;( This has me most perplexed.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups