Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Zeke

Setting the caret in an edit control

This topic is 6062 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

As part of my mfc app I have a dialog box popup that has a RichEditCtrl. I need to know how to automatically select that control as the current ctrl (so as soon as the dialog pops up the caret appears in the rich edit ctrl). here is a list of things ive tried: CRichEditCtrl::SetCaretPos() CRichEditCtrl::SetFocus() CRichEditCtrl::SetCapture() CRichEditCtrl::ShowCaret() CRichEditCtrl::SetActiveWindow() But none of them work. I need to physically click on the edit ctrl so that the caret appears before any of these functions will do anything, but I want to do it autmatically. Surely this cant be as hard as im finding it, there must be some simple function to put the caret on the control at start up or something? Thanks for any help you can offer

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!