Thread: RichEdit Font Color

  1. #1
    Unregistered
    Guest

    Post RichEdit Font Color

    I am using a multi-line rich edit control and am trying to change the color of the text. I bring up a Common Control Font Dialog and when the user selects the font and color I store the font in a COLORREF structure.

    Do you know what the message or function is to set the font color?

    I am using the API.

    Thanks
    Sean

  2. #2
    Registered User
    Join Date
    May 2002
    Posts
    132
    EM_SETCHARFORMAT is the windows message to change the font color. You need to use the CHARFORMAT or CHARFORMAT2 structures to pass to the windows procedure function. (check MSDN for more information on both the windows message and the structures as required)

    Hope this helps,
    Tyouk

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > Hope this helps,
    Yeah, post it 20 months ago when they might have cared.
    What part of "don't bump threads" don't you understand?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Critique my lighting model.
    By psychopath in forum Game Programming
    Replies: 4
    Last Post: 08-12-2006, 06:23 PM
  2. problem with my font manager
    By hannibar in forum C Programming
    Replies: 1
    Last Post: 03-07-2006, 08:03 AM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  4. CEditView Background Color & Font Color :: MFC
    By kuphryn in forum Windows Programming
    Replies: 5
    Last Post: 05-30-2002, 09:44 AM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM