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

    Linking 2 dialog boxes?

    Hi everyone. I'm trying to have 2 dialogs link to each other. Lets say, Dialog 1 has a next button on it that links to Dialog 2. Can someone pls pls tell me how to do it?? I've tried looking for it online but I don't understand it. Can someone give me some example code?? Thanks!

  2. #2
    Join Date
    Jan 2007
    Posts
    143

    Re: Linking 2 dialog boxes?

    Do it as a setup wizard....An activex component is present for this...

  3. #3
    Join Date
    May 2006
    Location
    Norway
    Posts
    1,709

  4. #4
    Join Date
    Jan 2008
    Posts
    54

    Re: Linking 2 dialog boxes?

    Thank you guys. I've looked at it but it seems that property sheets have tabs, which I don't want. And the wizard is too simple. My interface has 2 buttons, each one brings me to a different dialog. There is also a back button to press to go back to the previous dialog. Sorry if I didn't make it clear before. Anyone have any ideas pls? I don't know where to look anymore..
    Last edited by Buttercake; January 8th, 2008 at 12:17 PM.

  5. #5

    Re: Linking 2 dialog boxes?

    Can't you Create a property sheet in wizard mode? This will have Sheets "not" in the form of tabs but in the form of a wizard using back next and finish buttons.

    Links given by Laitinen (4th Link) explains that more clearly.

    Call SetWizardMode() for your property sheet.
    C++ is divine.

  6. #6
    Join Date
    Jan 2008
    Posts
    54

    Re: Linking 2 dialog boxes?

    Hi. Yes wizard isn't tabbed, but it only has next, back and finish buttons. If I have two or three or ten buttons on one dialog, and pressing each button goes to a different dialog, I can't really do that with a wizard can I? I guess my big problem is making a button link to a different dialog, ie pressing a button will make the current dialog disappear and a new one appear. Is there an easier way or piece of code to make it happen? I hope I don't have to change the visible settings and etc...Sorry if I sound confused. =(
    Last edited by Buttercake; January 8th, 2008 at 03:38 PM.

  7. #7
    Join Date
    May 2011
    Posts
    1

    Re: Linking 2 dialog boxes?

    You can use the DoModal() function.

    In your example double click on the button, make an object of the class "Dialog2".
    and then call the function DoModal().
    e.g.

    Dialog2 temp;
    temp.DoModal();

    Hope that will work for you.

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Linking 2 dialog boxes?

    Quote Originally Posted by rimmy View Post
    ...
    Hope that will work for you.
    I disagree...
    1. You didn't read the thread carefully enough or you don't understand the problem at all.
    2. I guess OP had solved his problem more than three years ago.
    Victor Nijegorodov

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