EM_SETPASSWORDCHAR
wParam = (WPARAM) (UINT) ch; /* character to display */
lParam = 0L; /* not used, must be zero */
An application sends an EM_SETPASSWORDCHAR message 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 message has no effect on a multiline edit control.
ch
Value of wParam. Specifies the character to be displayed in place of the character typed by the user. If the ch parameter is zero, the actual characters typed by the user are displayed.
The return value is nonzero if the message is sent to an edit control.
When the EM_SETPASSWORDCHAR message is received by an edit control, the edit control redraws all visible characters by using the character specified by the ch parameter.
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 an EM_SETPASSWORDCHAR message is sent with the wParam parameter set to zero.
This example sends an EM_SETPASSWORDCHAR message to set the password character of an edit control to a question mark:
SendDlgItemMessage
(hdlg, ID_MYEDITCONTROL, EM_SETPASSWORDCHAR, (WORD) '?', 0L);