Hi All,
How can I change default button in dialog box when applications is running?
thanx Martin
Printable View
Hi All,
How can I change default button in dialog box when applications is running?
thanx Martin
Try setting or resetting the BS_DEFPUSHBUTTON style.
Dave
I tried this, but only the button's look was changed.
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
if you use Setfocus to that control(default Pbutton)
Alternatively use the tab order...so the default PB comes before the other Buttons..............
- 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 ....
Try,
SetDefID()
Sally