CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    CRichEditCtrl: Set Font

    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


  2. #2
    Join Date
    May 1999
    Posts
    2

    Re: CRichEditCtrl: Set Font

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured