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.
This is a discussion on Automatic Rich Text Edit within the Windows Programming forums, part of the Platform Specific Boards category; I want to create a richtext edit. But with things like my numbers to be blue and the text red. ...
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.
╔╗╔╦══╦╗╔╦══╦╗
║╚╝║╔╗║╚╝║╔╗║║
║╔╗║╠╣║╔╗║╠╣╠╣
╚╝╚╩╝╚╩╝╚╩╝╚╩╝
codez http://code.google.com/p/zxcvbn/
>> 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!![]()
* Debian 6.0.1 on Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
* lighttpd, php5, perl, eruby, python.
* geany, XHTML & CSS & JavaScript, C, C++.
* GTK+ C & perl-gtk2