Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modal Windows display and return text
#1
Hi,
I need to display the text in the edit box in the newly opened modal window for editing. When the modal window is closed, the modified text is returned to the edit box

As shown in the picture below
https://download.ru/g/1KwVw1VE/QKLqwTlNE...1676038830
[Image: 1676038830]

Thanks in advance for any advice and help
david



Macro Macro6
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 Edit 0x54231044 0x200 8 8 208 100 ""
;4 Button 0x54032000 0x0 28 116 48 14 "Sci_Editor"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""

str controls = "3"
str e3
e3=
;hello world
;thank you for your help

if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4 ;;Sci_Editor
,_s.getwintext(id(3 hDlg))
,sub.Sci_Editor(hDlg _s)
ret 1

#sub Sci_Editor
function# [hwndOwner] [~txt]

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 346 206 "Dialog" "4"
;3 Scintilla 0x54000000 0x20000 0 0 346 184 ""
;1 Button 0x54030001 0x4 232 188 48 14 "OK"
;2 Button 0x54030000 0x4 288 188 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""

ret ShowDialog(dd &sub.DlgProc_Sci 0 hwndOwner)

#sub DlgProc_Sci
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread
Modal Windows display and return text - by Davider - 02-07-2023, 02:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)