Setting the caret in an edit control
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement