Share via


CEdit::GetPasswordChar

TCHARGetPasswordChar()const;

Return Value

Specifies the character to be displayed in place of the character typed by the user. The return value is NULL if no password character exists.

Remarks

Call this function to retrieve the password character displayed in an edit control when the user enters text.

If the edit control is created with the ES_PASSWORD style, the default password character is set to an asterisk (*).

For more information, see in the Win32 documentation.

Example

// The pointer to my edit.
extern CEdit* pmyEdit;

// Turn on the password mode.
pmyEdit->SetPasswordChar('*');
ASSERT(pmyEdit->GetStyle() & ES_PASSWORD);
ASSERT(pmyEdit->GetPasswordChar() == '*');

CEdit OverviewClass MembersHierarchy Chart

See Also   CEdit::SetPasswordChar