Unable to set cursor & focus in edit box (CEdit)
- From: Ashutosh <smbs-msdn@xxxxxxxxxxxxx>
- Date: Mon, 23 Jun 2008 23:26:22 +0530
Hi,
I have an edit box for which I am using a class which is inheriting from CEdit for overriding PreTranslateMessage.
I am intercepting Ctrl+K from this class. when this key is pressed, it posts a message to the dialog.
As a result of this key press the whole text in the edit box is changed.
Now, I am trying to set focus & the cursor to the end of the text. I tried calling these methods
CEdit::SetFocus();
CEdit::SetSel(-1,FALSE);
but its not setting the focus even. Can someone please tell me whats wrong or whats need to be done here?
Regards,
Ashutosh
.
- Follow-Ups:
- Re: Unable to set cursor & focus in edit box (CEdit)
- From: David Lowndes
- Re: Unable to set cursor & focus in edit box (CEdit)
- Prev by Date: Re: Warning In C++ Microsoft Visual Studio
- Next by Date: Re: Warning In C++ Microsoft Visual Studio
- Previous by thread: Include path - "Directories containing the source file"
- Next by thread: Re: Unable to set cursor & focus in edit box (CEdit)
- Index(es):
Relevant Pages
|
Loading