Moved to configure.ac
[pwlib.git] / tools / MsDevWizard / Chooser.cpp
blobaaac3b8948524afdcac0bfc3fcf5a08cfb97ae52
1 // chooser.cpp : Implements the CDialogChooser class
2 //
4 #include "stdafx.h"
5 #include "MsDevWizard.h"
6 #include "chooser.h"
7 #include "cstm1dlg.h"
9 #ifdef _PSEUDO_DEBUG
10 #undef THIS_FILE
11 static char THIS_FILE[] = __FILE__;
12 #endif
14 // On construction, set up internal array with pointers to each step.
15 CDialogChooser::CDialogChooser()
17 m_pDlgs[0] = NULL;
19 m_pDlgs[1] = new CCustom1Dlg;
21 m_nCurrDlg = 0;
23 // Remember where the custom steps begin, so we can delete them in
24 // the destructor
25 #define FIRST_CUSTOM_STEP 1
26 #define LAST_CUSTOM_STEP 1
28 // The destructor deletes entries in the internal array corresponding to
29 // custom steps.
30 CDialogChooser::~CDialogChooser()
32 for (int i = FIRST_CUSTOM_STEP; i <= LAST_CUSTOM_STEP; i++)
34 ASSERT(m_pDlgs[i] != NULL);
35 delete m_pDlgs[i];
39 // Use the internal array to determine the next step.
40 CAppWizStepDlg* CDialogChooser::Next(CAppWizStepDlg* pDlg)
42 ASSERT(0 <= m_nCurrDlg && m_nCurrDlg < LAST_DLG);
43 ASSERT(pDlg == m_pDlgs[m_nCurrDlg]);
45 m_nCurrDlg++;
46 return m_pDlgs[m_nCurrDlg];
49 // Use the internal array to determine the previous step.
50 CAppWizStepDlg* CDialogChooser::Back(CAppWizStepDlg* pDlg)
52 ASSERT(1 <= m_nCurrDlg && m_nCurrDlg <= LAST_DLG);
53 ASSERT(pDlg == m_pDlgs[m_nCurrDlg]);
55 m_nCurrDlg--;
56 return m_pDlgs[m_nCurrDlg];