03-22-2018, 10:28 AM
Hi !
In a dialog, i would like to "make clickable" a button if a condition is fulfilled
The problem is that i only found how to enable the button from a checkbox.
Long story short, i would like to make the button "Repair" clickable after button "Calculate" has been pressed.
How can i do that ? thanks in advance
Macro Macro3
In a dialog, i would like to "make clickable" a button if a condition is fulfilled
The problem is that i only found how to enable the button from a checkbox.
Long story short, i would like to make the button "Repair" clickable after button "Calculate" has been pressed.
How can i do that ? thanks in advance
Macro Macro3
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 Button 0x5C032000 0x0 120 44 48 14 "Repair"
;4 Button 0x54032000 0x0 56 44 48 21 "Calculate"
;5 Button 0x54012003 0x0 56 92 48 22 "Calculate"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "5"
str c5Cal
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,int a
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4
,,a=1
,,if a=1
,,,TO_Enable hDlg "3" but(lParam)
,case 5
,,a=1
,,if a=1
,,,TO_Enable hDlg "3" but(lParam)
ret 1