I want to create a richtext edit. But with things like my numbers to be blue and the text red. I want this to be those colors by them selfs even when the user changes text, Much like IDEs or Notepad++. How would I do this? Thanks, Queatrix.
Printable View
I want to create a richtext edit. But with things like my numbers to be blue and the text red. I want this to be those colors by them selfs even when the user changes text, Much like IDEs or Notepad++. How would I do this? Thanks, Queatrix.
Kind of like syntax highlighting? That sounds like a good buzzword.
>> Kind of like syntax highlighting
yeah, that's exactly what I mean.
Quick reference:
1. First, find the word, use EM_FINDTEXT.
2. EM_FIND_TEXT uses FINDTEXT, which uses CHARRANGE, start and ending position of the word.
3. Then, use EM_SETCHARFORMAT, which uses CHARFORMAT, for start and end position, color, masks, etc.
Good luck! :)