Domanda

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?

È stato utile?

Soluzione

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

Altri suggerimenti

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top