hey im trying to make an edit box that will serve to input the password. how do i make it so the user can type out the password in the box and show up as *'s but still set the correct password to the variable?
Create the edit control with style ES_PASSWORD turned on, and use CEdit::SetPasswordChar to set the character you want to be shown in place of every hidden character (default is '*').
CreateWindow(..... ES_PASSWORD | OTHER_STYLES ....)
or
Chech the property password to true or yes or something else (in dependency ov VC version) in design mode if you edit the box visually in resource editor.
The class wizard should also have a checkbox for this. Just look at the styles or extended styles of the control and something will suggest it is a password. Check it off and you are good to go.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.