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

    CRichEditView Bk Color

    Hi

    Does anyone know how to change the default
    background colour of a derived CRichEditView
    class

    Cheers

    Matty


  2. #2
    Join Date
    Apr 1999
    Posts
    24

    Re: CRichEditView Bk Color

    Hi Matty,

    In the View class which is Derived from CRichEditView add the following code in one function (for ex. OnColorChange) and call the function to change the Background clolor of the View which is Derived from CRichEditView.


    void OnColorChange()
    {
    GetRichEditCtrl().SetBackgroundColor(FALSE, RGB(255,0,0));
    }

    Here i have Changed the Color to RED if you want to change to any other color use COLORREF.

    Selva


  3. #3
    Join Date
    Apr 1999
    Posts
    2

    Re: CRichEditView Bk Color

    To Selva

    Thanks for the solution. The answer to that
    problem was driving me crazy delving into the MFC
    code when in fact it was so simple.

    Cheers


    Matty..........


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