Thread: help

  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 08: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?
    [email protected]
    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,868
    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