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.
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!
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.