CRichEditCtx.PasswordCharmethod
Gets/sets the password character that a rich edit control displays when the user enters text.
Syntax
PRIVATE PROPERTY CRichEditCtx.PasswordChar () AS LONG
Parameters
| Name | Description | |
|---|---|---|
dwchar | (SET) The character to be displayed in place of the characters typed by the user. If this parameter is zero, the control removes the current password character and displays the characters typed by the user. |
Return value
(GET) The return value specifies the character to be displayed in place of any characters typed by the user. If the return value is NULL, there is no password character, and the control displays the characters typed by the user.
(SET) The set property does not return a value.
Description
Gets/sets the password character that a rich edit control displays when the user enters text.
Remarks
When an edit control receives the EM_SETPASSWORDCHAR message, the control redraws all visible characters using the character specified by the dwchar parameter. If dwchar is zero, the control redraws all visible characters using the characters typed by the user.
If an edit control is created with the ES_PASSWORD style, the default password character is set to an asterisk (*). If an edit control is created without the ES_PASSWORD style, there is no password character. The ES_PASSWORD style is removed if an EM_SETPASSWORDCHAR is sent with the dwchar parameter set to zero.
Edit controls: Multiline edit controls do not support the password style or messages.
Example
(GET) PROPERTY PasswordChar () AS LONG (SET) PROPERTY PasswordChar (BYVAL dwchar AS DWORD)
Reference
- Defined in AfxNova/CRichEditCtx.inc:1543
- Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
- Topic: CRichEditCtx Class