CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 1999
    Location
    Philippines
    Posts
    5

    RichEdit Control

    How can I change the background of a block of text in RichEditBox Control, just the background of the text and not the entire background of the control?

    Chriztholeupithecus Abharroniuz

  2. #2
    Join Date
    Oct 1999
    Posts
    63

    Re: RichEdit Control

    You can use the SelColor property to change the color of the selected text.

    Rich.SelColor = RGB(0, 255, 0)





  3. #3
    Join Date
    Oct 1999
    Location
    Philippines
    Posts
    5

    Re: RichEdit Control

    I appreciate the help....but Selcolor(RGB) changes only the forecolor
    of the text.....What I want to change is the background....thx!!!



    Chriztholeupithecus Abharroniuz

  4. #4
    Join Date
    Jan 2001
    Location
    China
    Posts
    1

    Re: RichEdit Control

    send a message of EM_SETCHARFORMAT to it,
    lparam = a pointer to a CHARFORMAT2 structure.


  5. #5
    Join Date
    Apr 2001
    Posts
    44

    Re: RichEdit Control

    I have a problem as yours.

    I must use .SelRTF and .TextRTF property and then insert "\Highlightn" and "\highlight0" keyword before and after text you want to highlight.

    If you interested in this way, I can send source code to you.


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