Search code examples
c++winapitextcolors

Multi color Edit Field (Win32)


I want to create a program that will parse text for key words and make these words a certain color. What type of control supports many different colors? Would I have to create my own, or override the OnPaint() of a basic control or something? (Id like to avoid making my own control from scratch)

Thanks


Solution

  • One option would be to use the rich edit control:
    https://web.archive.org/web/20081210064447/http://www.codeproject.com/KB/edit/RichEditLog_Demo.aspx

    Another option would be to build a custom control:
    https://web.archive.org/web/20090228184337/http://www.codeproject.com/KB/edit/brainchild.aspx