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.

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.

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

What about RichEditBox?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.