Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input text
#2
Function Dialog2
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Edit 0x54030080 0x200 8 8 96 12 ""
;4 Button 0x54032000 0x0 8 24 48 14 "Set text"
;5 Button 0x54032000 0x0 64 24 48 14 "Get text"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040701 "*" "" "" ""

str controls = "3"
str e3
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 4 ;;Set text
,str s1="new text"
,DT_SetControl hDlg 3 s1
,
,case 5 ;;Get text
,str s2
,DT_GetControl hDlg 3 s2
,out s2
,
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread
Input text - by TNH - 07-31-2018, 02:25 AM
RE: Input text - by Gintaras - 07-31-2018, 02:54 AM
RE: Input text - by TNH - 08-02-2018, 01:15 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)