Hi,
In my wim32 script have 2 radio buttons and want one press button IDC_BTN it read value of radio button that checked.
I tried this format:
case IDC_BTN_BUYSTOP:
if ( SendMessage( GetDlgItem(hDlg1, IDC_RADIO1), BM_GETCHECK, 0,0 )== BST_CHECKED)
nSel = 40;
else if ( SendMessage( GetDlgItem(hDlg1, IDC_RADIO2), BM_GETCHECK, 0,0 )== BST_CHECKED)
nSel = 50;
SetWindowLong(hDlg1, GWL_USERDATA, nSel);
int res= GetWindowLong(hDlg1, GWL_USERDATA);
break;
return zero. tried this:
case IDC_BTN_BUYSTOP:
if ( SendMessage( GetDlgItem(hDlg1, IDC_RADIO1), BM_GETCHECK, 0,0 ))
nSel = 40;
else if ( SendMessage( GetDlgItem(hDlg1, IDC_RADIO2), BM_GETCHECK, 0,0 ))
nSel = 50;
SetWindowLong(hDlg1, GWL_USERDATA, nSel);
int res= GetWindowLong(hDlg1, GWL_USERDATA);
break;
return zero. and another
case IDC_BTN_BUYSTOP:
if ( ::SendMessage( GetDlgItem(hDlg1, IDC_RADIO1), BM_GETCHECK, 0,0 ))
nSel = 40;
else if ( ::SendMessage( GetDlgItem(hDlg1, IDC_RADIO2), BM_GETCHECK, 0,0 ))
nSel = 50;
SetWindowLong(hDlg1, GWL_USERDATA, nSel);
int res= GetWindowLong(hDlg1, GWL_USERDATA);
break;
return zero again.
What is correct format?
Regards,