Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalfree courses on line Pin
alona14-Jun-00 11:57
alona14-Jun-00 11:57 
GeneralRe: free courses on line Pin
Brian Hart25-Jun-00 13:05
Brian Hart25-Jun-00 13:05 
GeneralExecuting an exe Pin
Member 1176625714-Jun-00 7:36
Member 1176625714-Jun-00 7:36 
GeneralRe: Executing an exe Pin
GeVanCo14-Jun-00 8:19
GeVanCo14-Jun-00 8:19 
GeneralRe: Executing an exe Pin
Member 1176625714-Jun-00 8:46
Member 1176625714-Jun-00 8:46 
QuestionHow do I change the font color in CRichEditView? Pin
Mike Newberry14-Jun-00 6:26
sussMike Newberry14-Jun-00 6:26 
AnswerRe: How do I change the font color in CRichEditView? Pin
Mike Dunn14-Jun-00 8:14
Mike Dunn14-Jun-00 8:14 
GeneralRe: How do I change the font color in CRichEditView? Pin
Mike Newberry14-Jun-00 9:24
sussMike Newberry14-Jun-00 9:24 
Mike Dunn's suggestion started me thinking about the order of things adn I found the solution. I was calling GetRichEditCtrl().SetFont( m_EditorFont ) to set the font immediately *after* calling SetDefaultCharFormat(). Apparently, SetFont() set my font characteristics correctly, but reverted the color to the default system color since the LOGFONT has no provision for color information.

There are 2 ways to fix this: 1) set all the font info in the CHARFORMAT struct and skip the SetFont() call, or 2) call SetFont() *before* calling SetDefaultCharFormat(). I did method 2 to get a quick result. When I did this, the text color automatically changed for all the text *already* in the control, which is the behavior I wanted. I called these methods from the CRichEditView's OnInitialUpdate() method.

Thanks to Mike Dunn for providing the spark to figure this out!

Mike Newberry

Generalclass '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg' Pin
Member 135613-Jun-00 23:20
Member 135613-Jun-00 23:20 
GeneralRe: class '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg' Pin
Blake Miller14-Jun-00 5:52
Blake Miller14-Jun-00 5:52 
GeneralRe: class '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg' Pin
Brian Hart25-Jun-00 12:44
Brian Hart25-Jun-00 12:44 
GeneralChallenging Problem, Solution Wanted! Pin
Mike13-Jun-00 15:02
Mike13-Jun-00 15:02 
GeneralRe: Challenging Problem, Solution Wanted! Pin
Christoph Rupp15-Jun-00 4:45
sussChristoph Rupp15-Jun-00 4:45 
QuestionHow do I Set the default Location for Saving Files?? Pin
Member 1174279013-Jun-00 11:15
Member 1174279013-Jun-00 11:15 
AnswerRe: How do I Set the default Location for Saving Files?? Pin
ALfadhly13-Jun-00 11:35
sussALfadhly13-Jun-00 11:35 
AnswerRe: How do I Set the default Location for Saving Files?? Pin
solex13-Jun-00 22:29
solex13-Jun-00 22:29 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
Alfadhly14-Jun-00 5:27
sussAlfadhly14-Jun-00 5:27 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
solex14-Jun-00 5:45
solex14-Jun-00 5:45 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
Blake Miller14-Jun-00 5:48
Blake Miller14-Jun-00 5:48 
GeneralRe: How do I Set the default Location for Saving Files?? Pin
Alfadhly14-Jun-00 6:01
sussAlfadhly14-Jun-00 6:01 
QuestionRecently seen a Newsreader app sample? Pin
Matthias13-Jun-00 9:33
Matthias13-Jun-00 9:33 
AnswerRe: Recently seen a Newsreader app sample? Pin
Frank Deo14-Jun-00 5:54
Frank Deo14-Jun-00 5:54 
GeneralRe: Recently seen a Newsreader app sample? Pin
Matthias14-Jun-00 11:10
Matthias14-Jun-00 11:10 
GeneralRe: Recently seen a Newsreader app sample? Pin
Brian Hart25-Jun-00 13:03
Brian Hart25-Jun-00 13:03 
AnswerRe: Recently seen a Newsreader app sample? Pin
Alfadhly14-Jun-00 5:57
sussAlfadhly14-Jun-00 5:57 

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.