CiaranMcCormack
Programmer
Hi.
I am writing a script editor or my scriptengine, and want it to look like a regular compiler. To achieve this I want key words to be highlighted, so that the script is easy to read. I have been trying to implement this within a Rich Edit. I have been looking through the help files, and found a few things but none which achieve the desired results. The closest I found was to use
SendMessage(hEdit, EM_SETCHARFORMAT, SCF_WORD | SCF_SELECTION, (LPARAM) &cfm);
This will change the text colour of the text which is currently highlighted by the mouse. Is there any way to achieve this automatically so that all instance of int, float, void etc... will appear in a specified colour.
Thanks
Ciaran
I am writing a script editor or my scriptengine, and want it to look like a regular compiler. To achieve this I want key words to be highlighted, so that the script is easy to read. I have been trying to implement this within a Rich Edit. I have been looking through the help files, and found a few things but none which achieve the desired results. The closest I found was to use
SendMessage(hEdit, EM_SETCHARFORMAT, SCF_WORD | SCF_SELECTION, (LPARAM) &cfm);
This will change the text colour of the text which is currently highlighted by the mouse. Is there any way to achieve this automatically so that all instance of int, float, void etc... will appear in a specified colour.
Thanks
Ciaran