Click to See Complete Forum and Search --> : Change default button?


_Mec_
April 15th, 1999, 03:10 AM
Hi All,
How can I change default button in dialog box when applications is running?

thanx Martin

Dave Lorde
April 15th, 1999, 04:52 AM
Try setting or resetting the BS_DEFPUSHBUTTON style.

Dave

_Mec_
April 15th, 1999, 04:58 AM
I tried this, but only the button's look was changed.

Dave Lorde
April 15th, 1999, 06:37 AM
Did you reset the previous default? I don't know that this will work, but I don't see any other way to do it...

Dave

Saeed R
May 9th, 1999, 10:13 PM
if you use Setfocus to that control(default Pbutton)
Alternatively use the tab order...so the default PB comes before the other Buttons..............

Marco
May 9th, 1999, 10:29 PM
- Add a new button to your dialog.
- make this the new default button
- remove tab order from this button
- hide this button
- Add an OnButton...() Method to this button via ClassWizard
- in then OnButton...() Method call the OnButton..() Method of the visible buttons as you like ....

sally
May 10th, 1999, 02:49 AM
Try,

SetDefID()

Sally

Sally
May 10th, 1999, 02:49 AM
Try,

SetDefID()

Sally