help

This is a discussion on help within the Windows Programming forums, part of the Platform Specific Boards category; Dear All, can different classes share one dialog? Thank you!...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    38

    help

    Dear All,
    can different classes share one dialog?
    Thank you!
    Last edited by lwong; 11-11-2003 at 07:26 PM.

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    1. Use descriptive subject lines.

    2. Do you mean MFC classes, String classes, or what?

    3. By dialog, do you mean a window?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    38
    Sorry, i am a new user. So cannot declare clearly.
    The classes that i mean is MFC classes.Can different classes share one window, that means when i have some options, once i select one option, and click OK, it will display a dialog, when i select another option, click OK, it will display same dialog, but the context in "Edit"fields on the same dialog will change.(update same dialog)

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    AFAIK Yes.

    I would create a class that uses the dialog and handled the general stuff.

    Then create (derive) the other classes based on this dialog class.
    Then modify these derived classes as needed.

    So if you needed two diff ways for the dialog to work you would need three classes.
    The base, and then two derived from this class.

    I do this to create a theme to my apps. The base class handles all skinning, logos ect.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21