PRB: Password Edit Control Displays Incorrect Character (316306)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows XP
This article was previously published under Q316306 SYMPTOMS
When the Win32 application that creates edit controls supports Microsoft Windows XP visual styles, the edit controls that use the ES_PASSWORD style may display an incorrect password character.
CAUSE
The edit control Comctl32.dll, version 6, uses a round, black character from the Tahoma font as the password character. This character may not be defined in other fonts.
RESOLUTION
To resolve this problem, use one of the following methods:
- Use the Tahoma font in edit controls in Comctl32.dll version 6 when you use the ES_PASSWORD style.
- Send an EM_SETPASSWORDCHAR message to the edit control to specify a different password character in the control.
MORE INFORMATION
When you create the Comctl32.dll edit control with the ES_PASSWORD style, the default font is Tahoma.
Some dialog editors, such as the editor that is included with Microsoft Visual C++ 6.0, use MS Sans Serif as the default font for new dialog box templates. In an application that uses Comctl32.dll, version 6 throughout this article, the password character appears as a vertical bar in the edit control where the black circle character is expected.
Although edit controls in Comctl32.dll with the ES_PASSWORD style use the Tahoma font by default, the system sends a WM_SETFONT message to the edit control that uses the font that is specified in the dialog box template when the dialog box is created.
When you set the dialog box font to MS Shell Dlg, and if you use the DS_SHELLFONT style, the dialog box uses the system font. On Microsoft Windows XP, the default system font is Tahoma.
REFERENCES
For more information, refer to the following topics in the Platform SDK documentation:
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | kbEditCtrl kbprb KB316306 |
---|
|