Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Input text
#1
Hi 
I am a starter with QM.
I tried to fin an example for handling an edit field text from the dialog editor . No luck in the manual.
I downloaded the archive files but they are much higher level what i am looking for.
Can somebody help me please with an example or where can i fine these specific basics in the manual?
I am attaching the dialog editor code.

str dd=
 BEGIN DIALOG
 0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
 3 Edit 0x54030020 0x200 84 48 96 12 ""
 1 Button 0x54030001 0x4 116 116 48 14 "OK"
 2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
 END DIALOG
 DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "3"
str e3
if(!ShowDialog(dd 0 &controls)) ret

Thanks for your help!
#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
#3
Hi
Thanks for your help.
TNH


Forum Jump:


Users browsing this thread: 1 Guest(s)