To reset controls to default values, can be used DT_SetControls, but it must be slightly modified. If you don't want to wait for next QM version, use its copy DT_SetControls2:
;This function must be called from dialog procedure.
;Sets controls data.
;Called by DT_Init when initializing dialog.
;You can also call this function from dialog procedure, when you
;need to set controls again. Then lParam must be omitted or 0.
opt end 1 __DIALOG* d if(lParam) SetProp(hDlg "dialogdata" lParam); d=+lParam else d=+GetProp(hDlg "dialogdata"); if(!d) ret
str* p=d.pdata; if(!p) ret str cls li int i j k h n stl lh handle
for i 0 1000000 ,j=findt(p[0] i " "); if(j<0) break ,if(!isdigit(p[0][j])) end "invalid first string" 5 ,j=val((p[0]+j)) ,if(j) h=id(j hDlg); if(!h) end "dialog doesn't have control with id %i" 5 j ,k+1 ,str& s=p[k] ,if(s.len>s.nc or s.len<0 or (s.lpstr and IsBadWritePtr(s.lpstr 1)) or s.len!=len(s)) end "invalid str array" 5 ,if(!s.lpstr and lParam) continue , ,if(j=0) ,,if(lParam) s.setwintext(hDlg) ,,continue , ,sel(cls.getwinclass(h) 1) ,,case "Button" ,,stl=GetWinStyle(h)&15 ,,if(stl>1 and stl<7 or stl=9) ,,,if(val(s)) CheckDlgButton(hDlg j 1) ,,,else if(!lParam) CheckDlgButton(hDlg j 0) ,,,continue ,,, ,,case "ListBox" ,,stl=GetWinStyle(h)&LBS_MULTIPLESEL ,,TO_CBFill h s iif(stl 2 1) ,,continue ,, ,,case "ComboBox" ,,TO_CBFill h s ,,continue ,, ,,case "Static" ,,if(!lParam) continue ,,sel(GetWinStyle(h)&31) ,,,case SS_ICON ,,,int large=s[0]='&' ,,,handle=GetIcon(s+large large); if(handle=0) continue ,,,SendMessage(h STM_SETICON handle 0) ,,,lh=d.handles._len; d.handles._resize ,,,d.handles[lh].handle=handle; d.handles[lh].flags=1 ,,,continue ,,,case SS_BITMAP ,,,handle=LoadImage(0 s.expandpath IMAGE_BITMAP 0 0 LR_LOADFROMFILE); if(handle=0) continue ,,,SendMessage(h STM_SETIMAGE IMAGE_BITMAP handle) ,,,lh=d.handles._len; d.handles._resize ,,,d.handles[lh].handle=handle; d.handles[lh].flags=2 ,,,continue ,,, ,,case "RichEdit20A" ,,SendMessage h EM_LIMITTEXT 0x7FFFFFFE 0 ,,if(s.beg("&") and RichEditLoad(h s+1)) continue ,, ,s.setwintext(h)
ret 1
After upgrading QM you should stop using DT_SetControls2, and use DT_SetControls, because it may be extended in the future.
Other way - temporarily remove read-only property from System folder (not file), replace DT_SetControls text with this new text, and export/overwrite System folder.
_______________________
ret ;messages sel message ,case WM_INITDIALOG DT_Init(hDlg lParam); ret 1 ,case WM_DESTROY DT_DeleteData(hDlg) ,case WM_COMMAND goto messages2 ret ;messages2 sel wParam ,case 5 ,DT_SetControls2 hDlg ,case IDOK DT_Ok hDlg ,case IDCANCEL DT_Cancel hDlg ret 1
_____________________
I also have to say that dialog variables are not updated whenever something is changed in the dialog. To populate variables without closing the dialog, call DT_GetControls. It is called by DT_Ok, which also closes the dialog.
While in dialog proc, variables have default values, unless you call DT_GetControls.
Here is how all works:
1. When opening dialog, is called dialog procedure. Then message is WM_INITDIALOG. As you see, then is called DT_Init, which calls DT_SetControls, which initializes controls with interpreted values of dialog variables.
2. While dialog is open, dialog variables are not touched. That is, you don't have to reset variables. If you call DT_SetControls2, controls are reset to default values because variables have default values. But if you before called DT_GetControls, then variables are already changed, and if you want to reset all, reset each variable and then call DT_SetControls2.
3. When closing dialog with OK, is called dialog procedure. Then message is WM_COMMAND, and wParam is IDOK. Is called DT_Ok, which calls DT_GetControls, which collects values of controls and populates variables.