Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralA SetFont problem Pin
Vincent Ye18-Jul-03 4:21
Vincent Ye18-Jul-03 4:21 
GeneralRe: A SetFont problem Pin
Chris Losinger18-Jul-03 4:37
professionalChris Losinger18-Jul-03 4:37 
GeneralRe: A SetFont problem Pin
Vincent Ye18-Jul-03 4:57
Vincent Ye18-Jul-03 4:57 
GeneralRe: A SetFont problem Pin
Chris Losinger18-Jul-03 5:40
professionalChris Losinger18-Jul-03 5:40 
GeneralRe: A SetFont problem Pin
Vincent Ye18-Jul-03 5:53
Vincent Ye18-Jul-03 5:53 
GeneralRe: A SetFont problem Pin
Joel Lucsy18-Jul-03 7:27
Joel Lucsy18-Jul-03 7:27 
GeneralRe: A SetFont problem Pin
Vincent Ye18-Jul-03 7:33
Vincent Ye18-Jul-03 7:33 
GeneralRe: A SetFont problem Pin
Ryan Binns18-Jul-03 19:23
Ryan Binns18-Jul-03 19:23 
When you call SetFont(), are you doing something like this?
CFont font;
font.CreateFont(...);
SetFont(&font);
If you do this, the font will be destroyed as soon as the CFont object goes out of scope, so the default system font will be returned by GetFont(). Make sure you either detach the font (CFont::Detach()) or use a font object that is a class member.

Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

QuestionHelp: How to set background bitmap for Rebar? Pin
bin892218-Jul-03 4:04
bin892218-Jul-03 4:04 
Generalstring to long part 2 Pin
si_6918-Jul-03 3:51
si_6918-Jul-03 3:51 
GeneralRe: string to long part 2 Pin
Ian Darling18-Jul-03 4:00
Ian Darling18-Jul-03 4:00 
GeneralRe: string to long part 2 Pin
RChin18-Jul-03 4:07
RChin18-Jul-03 4:07 
GeneralRe: string to long part 2 Pin
Mike Nordell19-Jul-03 4:25
Mike Nordell19-Jul-03 4:25 
GeneralRe: string to long part 2 Pin
RChin20-Jul-03 23:26
RChin20-Jul-03 23:26 
GeneralRe: string to long part 2 Pin
John M. Drescher18-Jul-03 4:23
John M. Drescher18-Jul-03 4:23 
GeneralForcefully closeing a Winsock connection Pin
Giles18-Jul-03 3:29
Giles18-Jul-03 3:29 
GeneralRe: Forcefully closeing a Winsock connection Pin
Mike Nordell19-Jul-03 4:31
Mike Nordell19-Jul-03 4:31 
GeneralRe: Forcefully closeing a Winsock connection Pin
Giles19-Jul-03 4:50
Giles19-Jul-03 4:50 
GeneralRe: Forcefully closeing a Winsock connection Pin
Mike Nordell19-Jul-03 6:32
Mike Nordell19-Jul-03 6:32 
Generalkey press Pin
Newborn Naughtysaint18-Jul-03 3:14
Newborn Naughtysaint18-Jul-03 3:14 
GeneralRe: key press Pin
Xander8018-Jul-03 4:44
Xander8018-Jul-03 4:44 
GeneralRe: key press Pin
John M. Drescher18-Jul-03 8:34
John M. Drescher18-Jul-03 8:34 
GeneralBest way to test for file available Pin
captjack18-Jul-03 2:46
captjack18-Jul-03 2:46 
GeneralRe: Best way to test for file available Pin
Blake Miller18-Jul-03 5:33
Blake Miller18-Jul-03 5:33 
GeneralRe: Best way to test for file available Pin
captjack18-Jul-03 6:23
captjack18-Jul-03 6:23 

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.