Reputation: 1945
I am working on a Win32 program in which I load text files. Would it be possible to highlight a particular word that is being displayed in the edit box?
By highlight, I mean, something like changing the color of the text as in syntax highlighting.
Upvotes: 3
Views: 2770
Reputation: 1501
The Iczelion tutorial shows an alternative way to EM_SETCHARFORMAT
that seems more like what you are asking. There are a few other ones. It was more common back when computers were slower, but just-in-time highlighting is the way to go.
Upvotes: 2
Reputation: 597051
A standard Edit control does not support that. Use a RichEdit control instead. It supports applying font/color settings to a range of characters via the EM_SETCHARFORMAT
message.
Upvotes: 5