Font problems on 9x vs NT kernels (please help)
-
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?
-
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?
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); }
-
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); }
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.