How can I disable and enable all buttons ??

 

Hello,


I want to enable or disable all other buttons when I click on a button
I tried this but it doesn't works


void CMy_Form::OnClickButton1(void)  
  {
        Form1.m_button2.Disable()==true;       
}
 
tomm88:

Hello,


I want to enable or disable all other buttons when I click on a button
I tried this but it doesn't works


When you have this line:

m_button2.Disable();

You can check m_button2's status in button2's OnClick() function, with this line:

if (m_button2.IsEnabled())
{
   // Do what's necessary
}
 
Okay thank you
Now it works
Reason: