Question

I have text in edit control and I want to change color to some piece of text. In Embarcadero C++ builder, I'm selecting text like this:

edit1->SelStart = 10;
edit1->SelLength = 12;

and then change color:

edit1->SelAttributes->Color = clRed;

It's posible in Winapi standard Edit control or I must use Rich edit?

Was it helpful?

Solution

The short answer. No, you have to use a Rich Edit Control. Here a link to all messages a editcontrol can process: link

OTHER TIPS

A standard Edit control does not support per-character text formatting. You must use a RichEdit control for that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top