Discussion:
Change the text colour in CEditView at runtime
(too old to reply)
m***@gmail.com
2006-04-28 09:23:50 UTC
Permalink
Hi,

Basically I am developing a text editor.The color of the reserved words
should change at runtime like VC++ editor(eg. when we type 'int' the
color of int word will be changed to blue color).

I like to develop same as above.
I am using CEditView Class.
I am doing this in VC++.

Thanks,
Mugil.
Ajay Kalra
2006-04-28 12:29:27 UTC
Permalink
Post by m***@gmail.com
Hi,
Basically I am developing a text editor.The color of the reserved words
should change at runtime like VC++ editor(eg. when we type 'int' the
color of int word will be changed to blue color).
I like to develop same as above.
I am using CEditView Class.
I am doing this in VC++.
For something like this, you should look into using a rich edit control
instead.

--
Ajay Kalra [MVP - VC++]
***@yahoo.com
m***@gmail.com
2006-05-02 06:37:25 UTC
Permalink
Hi,

I have tried to use rich edit control.But I don't how to set the text
color.
Plz help me.

Thanks.
Mugil.
Drew
2006-05-02 15:14:00 UTC
Permalink
http://msdn2.microsoft.com/zh-CN/library/y4bx8s3h.aspx#_mfc_formatting_operations_cricheditctrl

http://msdn2.microsoft.com/zh-CN/library/kwc5txzf.aspx

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols/richeditcontrolreference/richeditstructures/charformat.asp

Watch for line wrap
Post by m***@gmail.com
Hi,
I have tried to use rich edit control.But I don't how to set the text
color.
Plz help me.
Thanks.
Mugil.
Ajay Kalra
2006-05-02 20:11:54 UTC
Permalink
Look here:

http://www.codeproject.com/richedit/
http://www.codeguru.com/Cpp/controls/richedit/

---
Ajay

Tom Serface
2006-04-28 16:21:54 UTC
Permalink
This article might help you get started:

http://www.codeproject.com/editctrl/crysedit.asp

Tom
Post by m***@gmail.com
Hi,
Basically I am developing a text editor.The color of the reserved words
should change at runtime like VC++ editor(eg. when we type 'int' the
color of int word will be changed to blue color).
I like to develop same as above.
I am using CEditView Class.
I am doing this in VC++.
Thanks,
Mugil.
Loading...