Function Reference


_GUICtrlEdit_GetPasswordChar

Gets the password character that an edit control displays when the user enters text

#include <GuiEdit.au3>
_GUICtrlEdit_GetPasswordChar ( $hWnd )

Parameters

$hWnd Control ID/Handle to the control

Return Value

Returns the character to be displayed in place of any characters typed by the user.

    If the return value is 0, there is no password character, and the control displays the characters typed by the user.

Related

_GUICtrlEdit_SetPasswordChar

Example

#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        ; Create GUI
        GUICreate("Edit Get/Set Password Char (v" & @AutoItVersion & ")", 400, 300)
        Local $idEdit = GUICtrlCreateInput("Test of build-in control", 2, 2, 394, 25, $ES_PASSWORD)
        GUISetState(@SW_SHOW)

        MsgBox($MB_SYSTEMMODAL, "Information", "Password Char: " & _GUICtrlEdit_GetPasswordChar($idEdit))

        _GUICtrlEdit_SetPasswordChar($idEdit, "$") ; change password char to $

        MsgBox($MB_SYSTEMMODAL, "Information", "Password Char: " & _GUICtrlEdit_GetPasswordChar($idEdit))

        _GUICtrlEdit_SetPasswordChar($idEdit) ; display characters typed by the user.

        MsgBox($MB_SYSTEMMODAL, "Information", "Password Char: " & _GUICtrlEdit_GetPasswordChar($idEdit))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>Example