Jump to content
  • Advertisement
Sign in to follow this  
uncle_rico

MFC RichEdit Controls: communicating back and forth between buttons.

This topic is 4433 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Heya, sorry to bug you guys with two separate MFC questions at once. This question has to do with communication between a RichEdit control and the text/paragraph formatting buttons. I have buttons for bold, italics, underline, strikethrough, and the left/right/center/justify alignments. I currently have it set up so that I can highlight text in the RichEdit control, press the text formatting buttons I want, and the text will update in the RichEdit control properly. However, most RTF editors go a step further, allowing the position of the cursor to determine which buttons are pressed. So, if you click to insert the typing cursor within text that is italicized, the italics button will appear depressed. Right now, my controls dont' do that. I was thinking that perhaps there is a message sent to my CFormView-derived class when the user clicks to insert a typing cursor somewhere, and I could look for that message, then obtain the CHARFORMAT2 for the text that the cursor was inserted into, then update the buttons and other controls accordingly. However, I don't know if any such message exists, or if this is the best way to handle this problem.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!