home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / appwiz / customwz / chooser.h < prev    next >
C/C++ Source or Header  |  1998-03-05  |  2KB  |  54 lines

  1. // chooser.h : declaration of the CDialogChooser class
  2. //             This class keeps track of what dialogs to pop up when,
  3. //              and remembers the current custom AppWizard "type" we're
  4. //              creating (see typedlg.[h,cpp])
  5. //
  6. // Copyright (c) 1985-1998, Microsoft Corporation. All rights reserved.
  7. //
  8.  
  9. #ifndef __CHOOSER_H__
  10. #define __CHOOSER_H__
  11.  
  12. // List of the steps we can pop up
  13. enum
  14. {
  15.     DLG_CUSTOMTYPE = 1,
  16.     DLG_ZAP,
  17.     DLG_SEQUENCE,
  18. };
  19.  
  20. #define NUM_DLGS 3
  21.  
  22. class CAppWizStepDlg;
  23. class CDialogChooser
  24. {
  25. public:
  26.     CDialogChooser();
  27.     ~CDialogChooser();
  28.  
  29.     // All calls by mfcapwz.dll to CCustomWizAppWiz::Next &
  30.     //  CCustomWizAppWiz::Back are delegated to these member
  31.     //  functions, which keep track of what dialog is up
  32.     //  now, and what to pop up next.
  33.     CAppWizStepDlg* Next(CAppWizStepDlg* pDlg);
  34.     CAppWizStepDlg* Back(CAppWizStepDlg* pDlg);
  35.  
  36.     // This class keeps track of the current custom AppWizard type
  37.     //  we plan to create.  This is determined by the
  38.     //  user at step 1 (typedlg.[h,cpp])
  39.     void SetCustomType(int nCustomType)
  40.         { m_nCustomType = nCustomType; }
  41.     int GetCustomType()
  42.         { return m_nCustomType; }
  43.  
  44. protected:
  45.     int m_nCurrDlg;     // Current step's DLG_ enum from above, or 0 for
  46.                         //  the intial "New Project" dialog.
  47.     CAppWizStepDlg* m_pDlgs[NUM_DLGS+1];
  48.                         // Instances of the dialog classes of our steps
  49.     int m_nCustomType;  // Current custom AppWizard type (enum from typedlg.h)
  50.     void UpdateTitleIfNecessary();
  51. };
  52.  
  53. #endif //__CHOOSER_H__
  54.