0

Hi guys, I have to do the following, but I am not sure how to go about doing it. For example, I am trying to make my edit box change font color.

So if the user inputs:

Hello Everybody!

I would need to change the color of the '!' to red. While "Hello Everybody" would be in black. How would this be done? I think this would be done by making the edit box accept and display html, but I am not sure how to do this. It would GetDlgItemText(EDITBOX), put everything into a string, then if that string contained '!' it would replace it with '<font color = "RED">!</font> Is this how I would go about doing this?

So here are the 2 things I need to do:

1. So basically, my project is to find '!' and change that color to red, so that it would show Hello Everybody in black, and the '!' in red. Could anybody tell me how I would go about doing this? The functions I would need? And how it would be done?

2. When the user changed the text of my edit box, it would set the boolean value 'SAVED' to false. How would I know if the user changed whats inside the edit box?

Thanks, Dave.

Edited by scriptkiddy: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by scriptkiddy
0

Can not be done because MFC will not give you what much control over it. All the text in the edit control is displayed in the same color.

You can't use html in any mfc control.

0

It's not for MFC. It is for plain C++

What about RichEditBox?

Edited by scriptkiddy: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.