Dafydd
July 12th, 1999, 05:25 AM
Hi,
Is it possible to get a button in a dialog to return a value to the view in a similar way to the OK and CANCEL buttons in a dialog?
I have placed a button in a dialog, called IDC_BUTTON_1 for example, and I would like to be able to do something like:
int response = dlg.DoModal();
if (responce == IDBUTTON1)
{
// Button 1 has been pressed.
}
if (response == IDOK)
{
// The OK button was pressed.
}
in the View i.e. once the button is pressed the dialog finishes (exactly as if OK had been pressed) and the View is given an opportunity to proceed with appropriate calculations.
Can anybody point me in the right direction to do this?
Thanks in advance
Dave
Is it possible to get a button in a dialog to return a value to the view in a similar way to the OK and CANCEL buttons in a dialog?
I have placed a button in a dialog, called IDC_BUTTON_1 for example, and I would like to be able to do something like:
int response = dlg.DoModal();
if (responce == IDBUTTON1)
{
// Button 1 has been pressed.
}
if (response == IDOK)
{
// The OK button was pressed.
}
in the View i.e. once the button is pressed the dialog finishes (exactly as if OK had been pressed) and the View is given an opportunity to proceed with appropriate calculations.
Can anybody point me in the right direction to do this?
Thanks in advance
Dave