CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    12

    Changing Color of an Edit Control

    Hi !

    I'm having a little problem when trying to change the background/text color of an edit control (with ES_MULTILINE style).
    I'm using the WM_CTL_COLOR message but only the first line is colored with the correct color.
    When i add a new line to the control, the color is correct. So i tried to manage the OnEraseBackGround & OnPaint event
    in order to repaint the color by myself (but it doesn't work fine because i use FillRect to repaint all the control, overriding the text color)
    Anybody has an idea of my problem ?
    thanks.



  2. #2
    Join Date
    Apr 1999
    Posts
    12

    Re: Changing Color of an Edit Control

    I found the problem. My Background CBrush member was not correctly initalized.


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