Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

using domodal()

jjbjjb Member Posts: 35
im creating a program using dialog boxes, im using the domadal() to go through a series of dialog boxes as i want the prgram to run like a wizard. as i open up the next dialog box, i would like the previous dialog box to close, the domodal() just disables the previous dialog box, has anyone got any ideas for this.
also when i reach the final dialog box i would like the finish button to close the application which is the funciton that does this.

Comments

  • stoberstober Member Posts: 9,765 ✭✭✭
    : im creating a program using dialog boxes, im using the domadal() to go through a series of dialog boxes as i want the prgram to run like a wizard. as i open up the next dialog box, i would like the previous dialog box to close, the domodal() just disables the previous dialog box, has anyone got any ideas for this.
    : also when i reach the final dialog box i would like the finish button to close the application which is the funciton that does this.
    :
    [blue]If you want wizzard style dialogs use the CPropertySheet and CPropertyPage classes. You can also set on up using VC++ 6.0 by selecting Project | Add To Project | Component and Controls | Visual C++ Components, then select Property Sheet from the list provided.[/blue]
  • DB1DB1 Member Posts: 1,142
    : : im creating a program using dialog boxes, im using the domadal() to go through a series of dialog boxes as i want the prgram to run like a wizard. as i open up the next dialog box, i would like the previous dialog box to close, the domodal() just disables the previous dialog box, has anyone got any ideas for this.
    : : also when i reach the final dialog box i would like the finish button to close the application which is the funciton that does this.
    : :
    : [blue]If you want wizzard style dialogs use the CPropertySheet and CPropertyPage classes. You can also set on up using VC++ 6.0 by selecting Project | Add To Project | Component and Controls | Visual C++ Components, then select Property Sheet from the list provided.[/blue]
    :


    You can also easily accomplish this by simply calling "OnOK()" before the next dialog is to be opened.
    [code]
    void CSomeProgram::OnSomeButtonClick()
    {
    CSomeOtherDialogClass CSomeDialog;

    OnOK(); [green]// close the open dialog [/green]

    CSomeDialog.DoItsModal(); [green]// open the next dialog [/green]
    }
    [/code]
    [italic][blue]To understand recursive, first you need to understand recursive[/blue][/italic]

Sign In or Register to comment.