Setting the caret in an edit control

Started by
-1 comments, last by Zeke 22 years, 5 months ago
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
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face

This topic is closed to new replies.

Advertisement