Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
1) Make sure you have a CEdit control variable attached to the resource with Class Wizard
2) Call SetPasswordChar at the necessary place within your program.
3) voila!
Here is some other information on the SetPasswordChar function:
Call this function to set or remove a password character displayed in an edit control when the user types text. When a password character is set, that character is displayed for each character the user types.
This member function has no effect on a multiple-line edit control.
When the SetPasswordChar member function is called, CEdit will redraw all visible characters using the character specified by ch.
If the edit control is created with the ES_PASSWORD style, the default password character is set to an asterisk (*). This style is removed if SetPasswordChar is called with ch set to 0.
As you can see, the SetPasswordChar function will take care of the problem for you.
If you have any further questions regarding this problem, please feel free to ask. Thanks!