This works for me! If it doesn't for you could you possibly provide some code please of what you're looking for.
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $hGUI = GUICreate('', 500, 500)
Local $iEdit = GUICtrlCreateEdit('', 0, 0, 500, 450)
Local $iDisplay = GUICtrlCreateButton('Toggle', 500 - 90, 500 - 30, 85, 25)
_DisplayPassword($hGUI, $iEdit)
GUISetState(@SW_SHOW, $hGUI)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $iDisplay
_DisplayPassword($hGUI, $iEdit)
EndSwitch
WEnd
GUIDelete($hGUI)
EndFunc ;==>Example
Func _DisplayPassword($hHandle, $iControlID)
Local Const $EM_GETPASSWORDCHAR = 0xD2, $EM_SETPASSWORDCHAR = 0xCC
Local $aControlGetPos, $iPasswordCharacter, $tRect
Switch GUICtrlSendMsg($iControlID, $EM_GETPASSWORDCHAR, 0, 0)
Case 0
$iPasswordCharacter = 9679 ; GUICtrlSendMsg($iControlID, $EM_GETPASSWORDCHAR, 0, 0)
Case Else
$iPasswordCharacter = 0
EndSwitch
GUICtrlSendMsg($iControlID, $EM_SETPASSWORDCHAR, $iPasswordCharacter, 0)
$aControlGetPos = ControlGetPos($hHandle, "", $iControlID) ; GUICtrlSetState($iControlID, $GUI_FOCUS)
$tRect = DllStructGetPtr("int " & $aControlGetPos[0] & ";int " & $aControlGetPos[1] & ";int " & $aControlGetPos[0] + $aControlGetPos[2] & ";int " & $aControlGetPos[1] + $aControlGetPos[3] & ";")
_WinAPI_InvalidateRect($hHandle, $tRect, False)
Return Number($iPasswordCharacter = 0)
EndFunc ;==>_DisplayPassword