Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle multiple dialog boxes with one class?

Status
Not open for further replies.

Realazad

Programmer
Apr 5, 2002
15
US
I have a class (derived from CDialog) that displays a dialog and processes the input. Now I need another dialog that has many similar properties to the one described above and should be opened instead, based on some criteria. I would like to handle both of these dialog boxes through the same class. Is this possible?

Thanks and Regds
 
Well, this is probably the best way to do it:

class CBaseDialog : public CDialog
{
};

class CDialog1 : public CBaseDialog
{};
class CDialog2 : public CBaseDialog
{};

To me it seems like a seperate dialog is a seperate object and that it would be bad form to put two in the same class. Anything's possible, however I think it could be a pain :)

-Bones
 
Thanks Bones, I guess I have to do it the Two-Class way as you suggest.

Thanks for responding.

Regds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top