Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
delay start of function with dialog
#2
Macro dialog with SysDateTimePick32 controls
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x10C80A48 0x100 0 0 223 135 "Form"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 SysDateTimePick32 0x54000000 0x204 8 10 110 14 ""
;4 SysDateTimePick32 0x54000001 0x204 8 32 110 14 ""
;5 SysDateTimePick32 0x54000009 0x204 8 54 110 14 ""
;6 SysDateTimePick32 0x54000004 0x204 8 78 110 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040701 "*" "" "" ""

DateTime t1 t2 t3

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

out t1.ToStr
out t2.ToStr
out t3.ToStr(4)


#sub DlgProc v
function# hDlg message wParam lParam

SYSTEMTIME st1 st2 st3

sel message
,case WM_INITDIALOG
,;here the controls can be initialized using SendMessage DTM_SETSYSTEMTIME. Use Google to find reference.
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,SendMessage(id(3 hDlg) DTM_GETSYSTEMTIME 0 &st1); t1.FromSYSTEMTIME(st1)
,SendMessage(id(4 hDlg) DTM_GETSYSTEMTIME 0 &st2); t2.FromSYSTEMTIME(st2)
,SendMessage(id(5 hDlg) DTM_GETSYSTEMTIME 0 &st3); t3.FromSYSTEMTIME(st3)
,
,case IDCANCEL
ret 1


Messages In This Thread
delay start of function with dialog - by jps01 - 04-19-2018, 03:12 PM
RE: delay start of function with dialog - by Gintaras - 04-19-2018, 03:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)