Send the EM_SETCUEBANNER message to the Edit control
Code: Select all
MyGui := Gui()
Edt01 := MyGui.AddEdit("w300")
EM_SETCUEBANNER(Edt01, "Edit Control Cue Text", 1) ; TRUE if the cue banner should show even when the edit control has focus
Edt02 := MyGui.AddEdit("w300")
EM_SETCUEBANNER(Edt02, "Edit Control Cue Text") ; FALSE is the default behavior the cue banner disappears when the user clicks in the control
MyGui.Show()
EM_SETCUEBANNER(handle, string, option := false)
{
static ECM_FIRST := 0x1500
static EM_SETCUEBANNER := ECM_FIRST + 1
SendMessage(EM_SETCUEBANNER, option, StrPtr(string), handle)
}
It is already on the wish list for v2 (https://www.autohotkey.com/boards/viewtopic.php?t=70852)