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

  1. // logowaw.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 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 related
  9. // electronic 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 "logowiz.h"
  15. #include "logowaw.h"
  16. #include "chooser.h"
  17.  
  18. #ifdef _PSEUDO_DEBUG
  19. #undef THIS_FILE
  20. static char 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 CLogowizAppWiz::InitCustomAppWiz()
  26. {
  27.     // Create a new dialog chooser; CDialogChooser's constructor initializes
  28.     //  its internal array with pointers to the steps.
  29.     m_pChooser = new CDialogChooser;
  30.  
  31.     // At first, we don't know the total number of steps, since there are two
  32.     //  possible "tracks" (MDI/SDI app and dialog-based app).
  33.     SetNumberOfSteps(-1);
  34.  
  35.     // Inform AppWizard of the languages we support
  36.     SetSupportedLanguages(_T("U.S. English (appwzenu.dll);0x40904b0"));
  37.  
  38.     // custom AppWizard-wide initialization
  39.     m_Dictionary.SetAt(_T("PROJTYPE_DLG"), CString("1"));   // default to dialog-based
  40.     m_Dictionary.SetAt(_T("HELP"), CString("1"));           // default to F1 help enabled
  41. }
  42.  
  43. // This is called just before the custom AppWizard is unloaded.
  44. void CLogowizAppWiz::ExitCustomAppWiz()
  45. {
  46.     // Deallocate memory used for the dialog chooser
  47.     ASSERT(m_pChooser != NULL);
  48.     delete m_pChooser;
  49.     m_pChooser = NULL;
  50.  
  51.     // TODO: Add code here to deallocate resources used by the custom AppWizard
  52. }
  53.  
  54. // This is called when the user clicks "Create..." on the New Project dialog
  55. //  or "Next" on one of the custom AppWizard's steps.
  56. CAppWizStepDlg* CLogowizAppWiz::Next(CAppWizStepDlg* pDlg)
  57. {
  58.     // Delegate to the dialog chooser
  59.     return m_pChooser->Next(pDlg);
  60. }
  61.  
  62. // This is called when the user clicks "Back" on one of the custom
  63. //  AppWizard's steps.
  64. CAppWizStepDlg* CLogowizAppWiz::Back(CAppWizStepDlg* pDlg)
  65. {
  66.     // Delegate to the dialog chooser
  67.     return m_pChooser->Back(pDlg);
  68. }
  69.  
  70. // Here we define one instance of the CLogowizAppWiz class.  You can access
  71. //  m_Dictionary and any other public members of this class through the
  72. //  global logowizaw.
  73. CLogowizAppWiz logowizaw;
  74.