CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    May 1999
    Posts
    4

    Change default button?

    Hi All,
    How can I change default button in dialog box when applications is running?

    thanx Martin


  2. #2
    Join Date
    Apr 1999
    Posts
    383

    Re: Change default button?

    Try setting or resetting the BS_DEFPUSHBUTTON style.

    Dave


  3. #3
    Join Date
    May 1999
    Posts
    4

    Re: Change default button?

    I tried this, but only the button's look was changed.


  4. #4
    Join Date
    Apr 1999
    Posts
    383

    Re: Change default button?

    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


  5. #5
    Join Date
    May 1999
    Posts
    78

    Re: Change default button?

    if you use Setfocus to that control(default Pbutton)
    Alternatively use the tab order...so the default PB comes before the other Buttons..............



  6. #6
    Join Date
    May 1999
    Location
    Piacenza, ITALIA
    Posts
    30

    Re: Change default button?

    - 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 ....


  7. #7
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: Change default button?

    Try,

    SetDefID()

    Sally


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured