Click here to Skip to main content
16,007,843 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating HTML out of a formatted text message Pin
nde_plume17-Dec-02 9:34
nde_plume17-Dec-02 9:34 
Generalc++ to hex Pin
Anonymous15-Dec-02 9:09
Anonymous15-Dec-02 9:09 
GeneralRe: c++ to hex Pin
Chris Losinger15-Dec-02 9:29
professionalChris Losinger15-Dec-02 9:29 
GeneralRe: c++ to hex Pin
Philip Patrick15-Dec-02 10:13
professionalPhilip Patrick15-Dec-02 10:13 
GeneralRe: c++ to hex Pin
Kannan Kalyanaraman15-Dec-02 17:50
Kannan Kalyanaraman15-Dec-02 17:50 
GeneralRe: c++ to hex Pin
Philip Patrick15-Dec-02 10:14
professionalPhilip Patrick15-Dec-02 10:14 
GeneralRe: c++ to hex Pin
User 665815-Dec-02 12:01
User 665815-Dec-02 12:01 
GeneralATL/WTL Windows and fonts Pin
Jörgen Sigvardsson15-Dec-02 7:58
Jörgen Sigvardsson15-Dec-02 7:58 
[edit]N/m, DEFAULT_GUI_FONT works, although SYSTEM_FONT doesn't for some reason. [/edit]

I'm baffled.

I have a scenario like this:
I have a splitter window. One pane contains a window, written by me, which itself hosts two windows - one list control and one window written by me. It's in this last window my problems occur.

In the WM_PAINT handler I do the usual CPaintDC dc(*this) and then I get on with the actual drawing. I want to draw some text (using DrawText) using the default gui font. So i HFONT hOldFont = dc.SelectObject((HFONT)GetStockObject(DEFAULT_GUI_FONT)). But guess what? It's not the default gui font (Tahoma)! It's that damn fixed font. I also tried with SYSTEM_FONT to no avail. I did try OEM_FIXED_FONT which gave me Courier which seems ok according to the MSDN docs. GetStockObject() does not return NULL. I'm stumped! Have I missed some initialization, window style, window class style, or something?

--
Only in a world this sh*tty could you even try to say these were innocent people and keep a straight face.
GeneralRe: ATL/WTL Windows and fonts Pin
Jörgen Sigvardsson15-Dec-02 8:09
Jörgen Sigvardsson15-Dec-02 8:09 
GeneralFindFirstFile problem Pin
Rickard Andersson2015-Dec-02 7:43
Rickard Andersson2015-Dec-02 7:43 
GeneralRe: FindFirstFile problem Pin
Chris Losinger15-Dec-02 7:45
professionalChris Losinger15-Dec-02 7:45 
GeneralRe: FindFirstFile problem Pin
Rickard Andersson2015-Dec-02 7:50
Rickard Andersson2015-Dec-02 7:50 
GeneralRe: FindFirstFile problem Pin
#realJSOP15-Dec-02 7:50
professional#realJSOP15-Dec-02 7:50 
GeneralRe: FindFirstFile problem Pin
Rickard Andersson2015-Dec-02 7:53
Rickard Andersson2015-Dec-02 7:53 
GeneralRe: FindFirstFile problem Pin
Rickard Andersson2015-Dec-02 7:59
Rickard Andersson2015-Dec-02 7:59 
GeneralRe: FindFirstFile problem Pin
Chris Losinger15-Dec-02 8:19
professionalChris Losinger15-Dec-02 8:19 
GeneralRe: FindFirstFile problem Pin
Jörgen Sigvardsson15-Dec-02 7:51
Jörgen Sigvardsson15-Dec-02 7:51 
GeneralOperatingSystemSimulator Pin
sikrip15-Dec-02 7:30
sikrip15-Dec-02 7:30 
GeneralRe: OperatingSystemSimulator Pin
zenboy15-Dec-02 13:57
zenboy15-Dec-02 13:57 
General_tsplitpath(..) API Pin
sedonya15-Dec-02 7:05
sedonya15-Dec-02 7:05 
GeneralRe: _tsplitpath(..) API Pin
Michael Dunn15-Dec-02 12:02
sitebuilderMichael Dunn15-Dec-02 12:02 
GeneralDirectShow: playing wmv Pin
hdi99kf@syd.kth.se15-Dec-02 6:28
hdi99kf@syd.kth.se15-Dec-02 6:28 
GeneralGDI question Pin
Shah Shehpori15-Dec-02 6:15
sussShah Shehpori15-Dec-02 6:15 
GeneralRe: GDI question Pin
Paul M Watt15-Dec-02 17:50
mentorPaul M Watt15-Dec-02 17:50 
GeneralPoliticalamity Pin
Kevnar15-Dec-02 5:52
Kevnar15-Dec-02 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.