Hi,

I have an edit control ( with the password property and the no hide selection properties to true), and I want that when the users clicks on it ( set the focus), all the text is selected, I have tried, to put this piece of code in the OnSetfocus of the edit control:

CEdit *pEdit = (CEdit *)GetDlgItem(IDED_PASSWORD);
UpdateData(TRUE);
pEdit->SetSel( 0, m_edPassword.GetLength(),TRUE);

But don't works, is any way to do this ?

Thanks, Bye !
Braulio