changing text on controls using SendMessage
I've been trying for about a week to figure out how to use the FindWindow, GetDlgItem and SendMessage functions in my scripts without success.
I take that back, I have been able to change the branding text.
I haven't been able to change text on an item inside the dialog.
I have the following code inside a function that is called from the page definition.
i.e.
Page components LoadCurrentLabel
Function LoadCurrentLabel
ReadRegStr $0 HKCU "SOFTWARE\my\program" "CurrentLabel"
FindWindow $1 "#32770"
GetDlgItem $1 $HWNDPARENT 1022
SendMessage $1 ${WM_SETTEXT} 0 "STR:Current Label: $0"
FunctionEnd
however, this doesn't work.
I've tried Id#'s
1006, 1021, 1022
the only one I can get it to work with is the branding text 1028.
any suggestions?
thanks,
-Tim