Thread: New Dialog

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    On a screen near you
    Posts
    498
    Rep Power
    14

    New Dialog


    Can anyone help us out here


    I want to create a new Dialog from the existing base class Dialog


    Ive added a new Dialog to my resources and registered with class wizard but im have trouble instantiating the new form


    My Dialog is called CMyDialog and in doing this


    CMyDialog MyDlg(this);
    int nRetcode = MyDlg.DoModal();


    The class im calling from is called CAboutDlg do i have to use this somewhere


    Mark

    Comments on this post

    • BaronVonDoppleG agrees
    100 trillion calculations per nanosecond
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    Where are you instantiating the new object? Do you create it when something is clicked on or moused over, when the parent dialog is initialized...?

    And what exactly is happening? Is the dialog not showing up, or are you getting error messages?

    If you're calling from CAboutDlg, then you won't be able to access your CMyDialog object until you open the About dialog (Help->About), assuming you're using either an SDI or MDI -type framework.
    Jon Sagara

    "Me fail English? That's unpossible!"
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    On a screen near you
    Posts
    498
    Rep Power
    14
    Thanks for your reply


    I had a button on one form that invokes a new Dialog but i forgot to add the include in the parent class for my new Dialog


    One i done that it worked


    Thanks


    Mark
    100 trillion calculations per nanosecond

IMN logo majestic logo threadwatch logo seochat tools logo