The EM_SETPASSWORDCHAR message sets the password character used by an edit control. This characters appears in place of each character entered into the edit control, in order to hide its contents. As the name implies, this is typically done to hide a password entered into the control. This message can also be used to tell an edit control not to use such a password character, instead telling it to actually display its contents.
EM_SETPASSWORDCHAR does not return a meaningful value.
None.
Const EM_SETPASSWORDCHAR = &HCC
' This code is licensed according to the terms and conditions listed here.
' Declarations and such needed for the example:
' (Copy them to the (declarations) section of a module.)
Public Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd _
As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long
Public Const EM_SETPASSWORDCHAR = &HCC
' Have edit control Text1 use a dash character to hide the password.
Dim retval As Long ' meaningless return value
retval = SendMessage(Text1.hWnd, EM_SETPASSWORDCHAR, ByVal CLng(Asc("-")), ByVal CLng(0))
Back to the Message list.
Back to the Reference section.
Last Modified: May 21, 2000
This page is copyright © 2000 Paul Kuliniewicz.
Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/e/em_setpasswordchar.html