• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 824
  • Last Modified:

How to disable a CButton (radio button)?

How to disable a CButton (radio button)?
in runtime

i couldn find a funktion like CButtbin m_R1.disable();
0
dkloeck
Asked:
dkloeck
  • 2
1 Solution
 
leflonCommented:
hi dkloeck,
if m_R1 is your CButton (or derived) you can use m_R1->Enable(FALSE) to disable and m_R1->Enable() to enable the button.

hth
leflon
0
 
bkfirebirdCommented:
it would be m_R1.EnableWindow (FALSE)
0
 
leflonCommented:
oopps,
too used working with pointers :)

bkfirebird is right

if
CButton m_R1;        // which ever Button you use
m_R1.Enable(...);

or
CButton* m_R1;
// assign some Button to pointer
m_R1->Enable(...);

leflon
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now