Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dialog check box
#1
I'm trying to get the check box to tell me male or female when they chose it but all I get is NOT when male or female is checked. I'm sure i am missing something but have no clue when I out the selected one that i chose it outs a blank like it isn't selected. Well here is the code any help would be great.
dialog Male_female
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "9 10"
str o9MAL o10FEM
if(!ShowDialog("Male_female" &Male_female &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 195 111 "Male/female"
;1 Button 0x54030001 0x4 122 128 48 14 "OK"
;2 Button 0x54030000 0x4 172 124 48 14 "Cancel"
;3 Button 0x54032000 0x0 34 82 56 26 "START "
;8 Button 0x54032000 0x0 90 82 56 26 "STOP"
;9 Button 0x54032009 0x0 46 60 34 13 "MALE"
;10 Button 0x54002009 0x0 90 60 42 13 "FEMALE"
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""


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 8;;----------STOPS MACRO--------
,case 3;;----------STARTS MACRO-------
,if(c9MAL=1)
,,out "male"
,else
,,if(c10FEM=1)
,,,out "Female"
,,else
,,,out "NOT"
,case IDOK
,DT_Ok hDlg ;;*
,case IDCANCEL DT_Cancel hDlg ;;*
ret 1

;* - not necessary in QM >= 2.1.9
#2
Function Male_female
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "9 10"
str o9MAL o10FEM
if(!ShowDialog("Male_female" &Male_female &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 195 111 "Male/female"
;1 Button 0x54030001 0x4 122 128 48 14 "OK"
;2 Button 0x54030000 0x4 172 124 48 14 "Cancel"
;3 Button 0x54032000 0x0 34 82 56 26 "START "
;8 Button 0x54032000 0x0 90 82 56 26 "STOP"
;9 Button 0x54032009 0x0 46 60 34 13 "MALE"
;10 Button 0x54002009 0x0 90 60 42 13 "FEMALE"
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 8;;----------STOPS MACRO--------
,case 3;;----------STARTS MACRO-------
,Acc a=acc("MALE" "RADIOBUTTON" win("Male/female" "#32770") "Button" "" 0x1001)
,int state=a.State()
,if state=1048592
,,out "Male"
,else
,,out "Female"
,case IDOK
,case IDCANCEL
ret 1

;* - not necessary in QM >= 2.1.9
#3
Thanks bro I was very sleepy last night lol and wasn't thinking but thank you very much.


Forum Jump:


Users browsing this thread: 1 Guest(s)