radio button states
-
i have 2 radio buttons grouped together, variable name is m_button, when i checked the .cpp file, m_button =-1 (initialized). How do i detect which button has been checked? if i use: if(m_button!=-1) then this means can be button a or button b but i want to detect specifically either one. anyone can clarify? thanx
-
i have 2 radio buttons grouped together, variable name is m_button, when i checked the .cpp file, m_button =-1 (initialized). How do i detect which button has been checked? if i use: if(m_button!=-1) then this means can be button a or button b but i want to detect specifically either one. anyone can clarify? thanx
-
i have 2 radio buttons grouped together, variable name is m_button, when i checked the .cpp file, m_button =-1 (initialized). How do i detect which button has been checked? if i use: if(m_button!=-1) then this means can be button a or button b but i want to detect specifically either one. anyone can clarify? thanx
Use separate
CButton
members for each radio button. Then test this condition:m_checkButton_1.GetCheck() == BST_CHECKED
to see if it's checked. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com
-
Use separate
CButton
members for each radio button. Then test this condition:m_checkButton_1.GetCheck() == BST_CHECKED
to see if it's checked. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com
-
i have 2 radio buttons grouped together, variable name is m_button, when i checked the .cpp file, m_button =-1 (initialized). How do i detect which button has been checked? if i use: if(m_button!=-1) then this means can be button a or button b but i want to detect specifically either one. anyone can clarify? thanx
There are good tutorials on radio button on CP you can check them out. My God is more powerfull Than Your God. (the line that divides the world)
-
Hi, I think radio buttons with in group box ( privious one) is better then separate CButton members for each radio button. Correct!!? With Regards, R.Selvam
I prefer to use individual (
CWnd
derived) members for each controls. That gives me complete control over my GUI and would also address your issue. /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com -
i have 2 radio buttons grouped together, variable name is m_button, when i checked the .cpp file, m_button =-1 (initialized). How do i detect which button has been checked? if i use: if(m_button!=-1) then this means can be button a or button b but i want to detect specifically either one. anyone can clarify? thanx