Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Dialog to Keep employee names
#15
I am just learning but I am getting farther away than I wanted to in understanding arrays and my first question about including the option buttons (will call back) and (no message) and (wants you to call).

I have this but something about the states with option 2 and 3 do not work.

Function Dialog5
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4 5"
str o3Opt o4Opt o5Opt
if(!ShowDialog("Dialog5" &Dialog5 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Button 0x54032009 0x0 10 6 48 12 "Option first"
;4 Button 0x54002009 0x0 10 24 48 12 "Option next"
;5 Button 0x54002009 0x0 10 44 48 13 "Option next"
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,Acc o3O=acc("Option first" "RADIOBUTTON" win("Dialog" "#32770") "Button" "" 0x1001)
,int state1=o3O.State()
,Acc o4O=acc("Option next" "RADIOBUTTON" win("Dialog" "#32770") "Button" "" 0x1001)
,int state2=o4O.State()
,Acc o50=acc("Option next" "RADIOBUTTON" win("Dialog" "#32770") "Button" "" 0x1001)
,int state3=o50.State()
,out state1
,out state2
,out state3
,if(state1=1048592)
,,out "Option 1 is selected"
,if(state2=1048592)
,,out "Option 2 is selected"
,if(state3=1048592)
,,out "Option 3 is selected"
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case IDCANCEL
ret 1

as I said I am probably taking the long way around understanding arrays but maybe I will learn something this way.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)