Hi, I have the following rc file (snippet) describing a dialog box with 2 radio buttons.
MyDialog DIALOG 10, 10, 150, 70
CAPTION "Change start and end"
BEGIN
DEFPUSHBUTTON "Confirm", IDC_CONFIRM, 91,10,52,13
PUSHBUTTON "Cancel", IDC_EXIT, 91,26,52,13
AUTORADIOBUTTON "Random", IDC_RADIO_LINEAR , 12,45,40,13, 131072 // 131072 = WS_GROUP
AUTORADIOBUTTON "Linear", IDC_RADIO_RANDOM , 62,45,30,13
END
When I initialise the dialog box both the radiobuttons appear not selected. How would I select one of the radiobuttons from within my code (after WM_INITDIALOG) ?
Thanks in advance
Hello
invoke CheckDlgButton,hWnd,1002,BST_CHECKED
Regards,
actually, radio buttons have their own function, used to select which button of a group is checked
CheckRadioButton
https://msdn.microsoft.com/en-us/library/windows/desktop/bb761877%28v=vs.85%29.aspx (https://msdn.microsoft.com/en-us/library/windows/desktop/bb761877%28v=vs.85%29.aspx)
Okay thanks! clearly I was looking in the wrong place..