Fonts in static controls
From: David Webber (dave_at_musical.demon.co.uk)
Date: 12/10/04
- Next message: muchan: "Re: Dynamic creation of objects by class name"
- Previous message: Larry Brasfield: "Re: Copy contents of map into vector"
- Next in thread: David Lowndes: "Re: Fonts in static controls"
- Reply: David Lowndes: "Re: Fonts in static controls"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Dec 2004 10:31:29 -0000
I am having difficulty setting the font in a static control in a
dialogue.
I have a LOGFONT from which I do CFont::CreateFontIndirect (and
preserve the CFont for the lifetime of the dialogue), and then use
CWnd::SetFont() on the control from within OnInitDialog().
The face and size of the font appear as directed, but I am always
getting the default character set (in my case ANSI_CHARSET) instead
of the one set in the LOGFONT (which in this case is
EASTEUROPE_CHARSET).
The EASTEUROPE_CHARSET is obtained very nicely from the same LOGFONT
when I construct a Font for DrawText in my application's document
window.
Any ideas how to get the desired character set in the static
control?
I think that people with EASTEUROPE_CHARSET as default always see
that, even if the LOGFONT is western, (I'm looking into it) so it
looks like Windows is overriding the character set with the local(e)
default?
[Context: my application is an old-fashioned non-unicode application
and the above happens under XP (though I suspect it may also happen
under win98).]
Dave
-- David Webber Author MOZART the music processor for Windows - http://www.mozart.co.uk For discussion/support see http://www.mozart.co.uk/mzusers/mailinglist.htm
- Next message: muchan: "Re: Dynamic creation of objects by class name"
- Previous message: Larry Brasfield: "Re: Copy contents of map into vector"
- Next in thread: David Lowndes: "Re: Fonts in static controls"
- Reply: David Lowndes: "Re: Fonts in static controls"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|