Click to See Complete Forum and Search --> : CRichEditCtrl: Set Font


April 28th, 1999, 11:14 AM
Maybe it's a bit of a newbie question, but how can I make my CRichEditCtrl display text using a 10 point "Courier New" font? Does anyone have a small code example?

How can I modify this code to have newly entered text with the new font, but existing text with the old font?

Jens

ArEm
April 28th, 1999, 01:04 PM
Look at the CRichEditCtrl::SetSelectionCharFormat method.
To change the char format only for new text you must set the selection with CRichEditCtrl::SetSel method.
The first and second parameters must be equal to the length of the old text.
If you have troubles, let me know about them.