C/C++ Win32 Radio Button Code for Visual C++ | No MFC

  • Thread starter Thread starter 31si
  • Start date Start date
  • Tags Tags
    Radio
Click For Summary
To retrieve the checked state of a radio button in Visual C++ without using MFC, the discussion highlights the use of the GetCheck() method on a CButton member object. By declaring a CButton member, such as m_MyRadio, within the dialog, the checked status can be easily accessed using m_MyRadio.GetCheck(). This approach provides a straightforward solution for managing radio button states in a non-MFC environment.
31si
Messages
21
Reaction score
0
Hello

I have googled to no avail. I am after the code to retrieve if a radio box is checked or not in Visual C++. I am not using MFC which all of the tutorial on the internet do. Any ideas? A few pointers in the right direction possibly?
 
Technology news on Phys.org
I always bind my controls to a class member. If I declared a CButton member object in my dialog named m_MyRadio, then:

m_MyRadio.GetCheck ();

will do the trick.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
9
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 25 ·
Replies
25
Views
15K
  • · Replies 6 ·
Replies
6
Views
12K