Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DateTimePicker unable to select and modify a specific field
#1
In the following code, I encountered two problems:

1. After clicking on the DateTimePicker, unable to select and modify a specific field.
2. How incremented value of the month in DATE?

Macro Macro22
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;4 SysDateTimePick32 0x56030009 0x0 120 16 96 15 ""
;3 SysDateTimePick32 0x56030001 0x0 16 16 96 15 ""
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040C02 "*" "" "" ""

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


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,DATE d.getclock ;;get current time
,d=d+1 ;;add 1 day
,;how to add 1 month?
,
,_s.timeformat("{yy-MM-dd}" d)
,SendMessage(id(3 hDlg) DTM_SETFORMAT 0 _s)
,
,_s.timeformat("{HH:mm}")
,SendMessage(id(4 hDlg) DTM_SETFORMAT 0 _s)
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Messages In This Thread
DateTimePicker unable to select and modify a specific field - by Davider - 09-24-2023, 11:08 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)