RichEdit Font Color

This is a discussion on RichEdit Font Color within the Windows Programming forums, part of the Platform Specific Boards category; I am using a multi-line rich edit control and am trying to change the color of the text. I bring ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,544
    > 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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 07:03 AM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 09: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, 09:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21