08-06-2022, 02:13 AM
from the picture it looks as if you want to leave the ┆ in place
if so use this
If you want to remove the ┆ completely, then do this
if so use this
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 392 192 "Dialog" "4"
;4 Edit 0x54030080 0x200 280 8 104 12 ""
;5 Edit 0x54030080 0x204 280 28 104 13 ""
;3 Edit 0x54231044 0x200 8 8 264 176 ""
;1 Button 0x54030001 0x4 280 171 48 14 "OK"
;2 Button 0x54030000 0x4 336 171 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""
str controls = "4 5 3"
str e4 e5 e3
e3=
;My name is ┆name┆, my age is ┆age┆, thank you!
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc v;; must have v attribute
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,SendMessage id(4 hDlg) EM_SETCUEBANNER TRUE @"┆name┆"
,SendMessage id(5 hDlg) EM_SETCUEBANNER TRUE @"┆age┆"
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case [EN_CHANGE<<16|4,EN_CHANGE<<16|5]
,DT_GetControls(hDlg)
,if(empty(e4))
,,e4="name"
,if(empty(e5))
,,e5="age"
,_s=F" My name is ┆{e4}┆, my age is ┆{e5}┆, thank you!"
,DT_SetControl(hDlg 3 _s)
ret 1
If you want to remove the ┆ completely, then do this
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 392 192 "Dialog" "4"
;4 Edit 0x54030080 0x200 280 8 104 12 ""
;5 Edit 0x54030080 0x204 280 28 104 13 ""
;3 Edit 0x54231044 0x200 8 8 264 176 ""
;1 Button 0x54030001 0x4 280 171 48 14 "OK"
;2 Button 0x54030000 0x4 336 171 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""
str controls = "4 5 3"
str e4 e5 e3
e3=
;My name is ┆name┆, my age is ┆age┆, thank you!
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc v;; must have v attribute
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,SendMessage id(4 hDlg) EM_SETCUEBANNER TRUE @"┆name┆"
,SendMessage id(5 hDlg) EM_SETCUEBANNER TRUE @"┆age┆"
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case [EN_CHANGE<<16|4,EN_CHANGE<<16|5]
,DT_GetControls(hDlg)
,if(empty(e4))
,,e4="┆name┆"
,if(empty(e5))
,,e5="┆age┆"
,_s=F" My name is {e4}, my age is {e5}, thank you!"
,DT_SetControl(hDlg 3 _s)
ret 1