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

  1. // hierwaw.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and Microsoft
  9. // QuickHelp and/or WinHelp documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "hierwiz.h"
  15. #include "hierwaw.h"
  16. #include "chooser.h"
  17.  
  18. #ifdef _PSEUDO_DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. // This is called immediately after the custom AppWizard is loaded.  Initialize
  24. //  the state of the custom AppWizard here.
  25. void CHierwizAppWiz::InitCustomAppWiz()
  26. {
  27.     m_pChooser = new CDialogChooser ;
  28.     // There are 2 steps in this custom AppWizard.
  29.     SetNumberOfSteps(2);
  30.  
  31. }
  32.  
  33. // This is called just before the custom AppWizard is unloaded.
  34. void CHierwizAppWiz::ExitCustomAppWiz()
  35. {
  36.     //Deallocate memory used by the dialog chooser.
  37.     ASSERT(m_pChooser !=NULL) ;
  38.     delete(m_pChooser) ;
  39.     m_pChooser = NULL ;
  40. }
  41.  
  42. // This is called when the user clicks "Create..." on the New Project dialog
  43. CAppWizStepDlg* CHierwizAppWiz::Next(CAppWizStepDlg* pDlg)
  44. {
  45.     // Set template macros based on the project name entered by the user.
  46.     return m_pChooser->Next(pDlg) ;
  47. }
  48.  
  49. CAppWizStepDlg* CHierwizAppWiz::Back(CAppWizStepDlg* pDlg)
  50. {
  51.     return m_pChooser->Back(pDlg) ;
  52. }
  53.  
  54. // Here we define one instance of the CHierwizAppWiz class.  You can access
  55. //  m_Dictionary and any other public members of this class through the
  56. //  global hierwiaw.
  57. CHierwizAppWiz hierwizaw;
  58.