Force ES_PASSWORD style on Edit control
Posted: 11 Jul 2017, 22:22
I'm having trouble forcing an edit control to use the ES_PASSWORD (0x20) style. As a simple test I open a blank notepad window, type a few lines of gibberish, and run
But the control's contents are not obfuscated as I would expect. Forcing the window/control to be redrawn
doesn't seem to help either. Other styles (like ES_CENTER 0x1) work as expected. I feel like this should be super simple. What am I missing?
Code: Select all
ControlGet, ControlHwnd, Hwnd, , Edit1, Untitled - Notepad
Control, Style, +0x20, , ahk_id %ControlHwnd%
Code: Select all
WinSet, Redraw, , Untitled - Notepad
WinMove, Untitled - Notepad, , 10, 10
WinHide, Untitled - Notepad
WinShow, Untitled - Notepad