Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralailFreeing memory Pin
laiju9-Jun-05 4:57
laiju9-Jun-05 4:57 
GeneralRe: ailFreeing memory Pin
Cedric Moonen9-Jun-05 5:05
Cedric Moonen9-Jun-05 5:05 
GeneralRe: ailFreeing memory Pin
Budric B.9-Jun-05 5:13
Budric B.9-Jun-05 5:13 
GeneralRead a line from a text file Pin
bkphat9-Jun-05 4:34
bkphat9-Jun-05 4:34 
GeneralRe: Read a line from a text file Pin
toxcct9-Jun-05 5:18
toxcct9-Jun-05 5:18 
GeneralRe: Read a line from a text file Pin
James R. Twine9-Jun-05 5:49
James R. Twine9-Jun-05 5:49 
GeneralChanging the font of a control ( CStatic ) Pin
Maximilien9-Jun-05 4:34
Maximilien9-Jun-05 4:34 
GeneralRe: Changing the font of a control ( CStatic ) Pin
James R. Twine9-Jun-05 4:42
James R. Twine9-Jun-05 4:42 
Maximilien wrote:
CFont newFont;

   You are creating the font correctly.  But since it is local to the function, it goes out of scope when the function exits.  This means that the font the control is trying to use has been destroyed.  So the next time it tries to draw, it no longer has a valid font.

   Make the CFont object a member of the class.  That should do it for you.

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
GeneralRe: Changing the font of a control ( CStatic ) Pin
Maximilien9-Jun-05 5:32
Maximilien9-Jun-05 5:32 
GeneralRe: Changing the font of a control ( CStatic ) Pin
James R. Twine9-Jun-05 5:45
James R. Twine9-Jun-05 5:45 
GeneralRe: Changing the font of a control ( CStatic ) Pin
Michael Dunn9-Jun-05 6:55
sitebuilderMichael Dunn9-Jun-05 6:55 
GeneralRe: Changing the font of a control ( CStatic ) Pin
Maximilien9-Jun-05 7:04
Maximilien9-Jun-05 7:04 
GeneralMSVCIRT error Pin
ronwurster9-Jun-05 4:06
ronwurster9-Jun-05 4:06 
GeneralRe: MSVCIRT error Pin
Blake Miller9-Jun-05 6:29
Blake Miller9-Jun-05 6:29 
Generalimage processing Pin
Arrun9-Jun-05 2:25
Arrun9-Jun-05 2:25 
GeneralRe: image processing Pin
Member 14276929-Jun-05 2:47
Member 14276929-Jun-05 2:47 
GeneralLoad msword doc files in mfc Pin
GnanaprakashJebaraj9-Jun-05 2:15
GnanaprakashJebaraj9-Jun-05 2:15 
GeneralRe: Load msword doc files in mfc Pin
David Crow9-Jun-05 2:23
David Crow9-Jun-05 2:23 
GeneralRe: Load msword doc files in mfc Pin
GnanaprakashJebaraj10-Jun-05 1:30
GnanaprakashJebaraj10-Jun-05 1:30 
GeneralRe: Load msword doc files in mfc Pin
David Crow10-Jun-05 5:51
David Crow10-Jun-05 5:51 
GeneralRe: Load msword doc files in mfc Pin
ThatsAlok9-Jun-05 18:32
ThatsAlok9-Jun-05 18:32 
GeneralRe: Load msword doc files in mfc Pin
GnanaprakashJebaraj10-Jun-05 1:34
GnanaprakashJebaraj10-Jun-05 1:34 
GeneralRe: Load msword doc files in mfc Pin
ThatsAlok10-Jun-05 1:40
ThatsAlok10-Jun-05 1:40 
GeneralRe: Load msword doc files in mfc Pin
GnanaprakashJebaraj15-Jun-05 20:34
GnanaprakashJebaraj15-Jun-05 20:34 
GeneralParser for C++ Pin
Member 14276929-Jun-05 1:01
Member 14276929-Jun-05 1:01 

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.