Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Implementing Text highlighting in Rich Edit Control

Implementing Text highlighting in Rich Edit Control

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionlounge
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SachinBhave
    wrote on last edited by
    #1

    Hi all, I have an application written in Visual C++6.0 which uses a Rich Edit Control to display user chat. I want to implement text highlighting as in MS Word for this rich edit control so that I can highlight messages from particular players. I am using CHARFORMAT structure for formatting text. Can someone help me implementing this? I tried using CHARFORMAT2 which has text BackColor property but it didnt help. Thanking in anticipation Sachin Bhave

    S 1 Reply Last reply
    0
    • S SachinBhave

      Hi all, I have an application written in Visual C++6.0 which uses a Rich Edit Control to display user chat. I want to implement text highlighting as in MS Word for this rich edit control so that I can highlight messages from particular players. I am using CHARFORMAT structure for formatting text. Can someone help me implementing this? I tried using CHARFORMAT2 which has text BackColor property but it didnt help. Thanking in anticipation Sachin Bhave

      S Offline
      S Offline
      Suresh H
      wrote on last edited by
      #2

      CHARFORMAT2 cf; memset(&cf, 0, sizeof(CHARFORMAT2)); cf.cbSize = sizeof(CHARFORMAT2); cf.dwMask = CFM_BOLD; cf.dwEffects = CFE_BOLD; COLORREF clr =RGB(255, 10, 15) ; cf.dwMask =CFM_COLOR; //cf.dwEffects = CFE_AUTOCOLOR; // Bold cf.crTextColor = clr;

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups