View Full Version: Radio buttons

C++ Learning Community > win32 api C++ programming > Radio buttons


Title: Radio buttons


Dragon - July 12, 2003 02:48 AM (GMT)
Ok, I figured out how to create radio buttons (they are buttons but you set BS_RADIOBUTTON in CreateWindow). However, I don't know how to use them! How do I make it so that when a button is pressed, it checks which radio button is selected, then do something depending on which radio button is selected?

dr voodoo - July 14, 2003 10:32 PM (GMT)
You can use
CODE
if (SendMessage(button1,BM_GETCHECK,0,0)==true)

(Where button1 is the HWND of your button/ratio) to check if a ratio or check box is checkd. But there is more to ratio buttons than that. I could wrapp up a little example if you need one.

Dragon - July 14, 2003 11:05 PM (GMT)
An example would be nice, Dr. Voodoo. But not an example on radio buttons! I know you've already did an example about drop down menus, but I still don't understand some aspects of them. Can you make an example with a drop down menu and a button. When the button is pressed it checks what the value is for the drop down menu, then displays the value in a message box. I think that'll be enough for me to learn about using char with drop down menus, instead of int, float, or double.

dr voodoo - July 15, 2003 11:37 AM (GMT)
Look in the creation forum




* Hosted for free by InvisionFree