cvega:Checkbox and Radiobutton are all types of "button" class.
For checkbox, add "button" window with style BS_CHECKBOX or BS_AUTOCHECKBOX.
For radiobutton, add "button" window with style BS_RADIOBUTTON or BS_AUTORADIOBUTTON.
Cheers,
-chris
Ok Chris! I got the Radio buttons to work now, thanks!
I want to follow-up the question. The scenario is that I want the messagebox to appear only after I click the ok button, the code below does not work but...
.386
...
.data
caption db "Information",0
yes_message db "You chose yes!",0
no_message db "You chose no!",0
...
.code
start:
...
.elseif uMsg==WM_COMMAND
.if wParam==IDC_BUTTON_MAIN_OK
.if wParam==IDC_RADIO_YES
push 0
push offset caption
push offset yes_message
push hWin
call MessageBox
.elseif wParam==IDC_RADIO_NO
push 0
push offset caption
push offset no_message
push hWin
call MessageBox
.endif
...
.endif
...
end start
... I tried this one, cause I'm out of ideas, but it works. Is there a better way to do what the working code below does?
.386
...
.data
caption db "Information",0
yes_message db "You chose yes!",0
no_message db "You chose no!",0
final_message db 128 dup(0)
...
.code
start:
...
.elseif uMsg==WM_COMMAND
.if wParam==IDC_BUTTON_MAIN_OK
push 0
push offset caption
push offset final_message
push hWin
call MessageBox
.elseif wParam==IDC_RADIO_YES
push offset yes_message
push offset final_message
call lstrcpy
.elseif wParam==IDC_RADIO_NO
push offset no_message
push offset final_message
call lstrcpy
...
.endif
...
end start
Thanks again dude! I really appreciate your help. :D
Regards,
m0ds