How can I check whether the Control^ is a Button^ in the following code?
System::Void DisableControls(Control ^parent)
{
for each (Control^ c in parent->Controls)
{
if(c== /*Check for Button*/)
{
//Do something
}
}
}
You can use
GetType()andtypeidfor this: