Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.1 KiB

  1. // WhatToDoPendingPage.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "CertWiz.h"
  5. #include "WhatToDoPendingPage.h"
  6. #include "Certificat.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CWhatToDoPendingPage property page
  14. IMPLEMENT_DYNCREATE(CWhatToDoPendingPage, CIISWizardPage)
  15. CWhatToDoPendingPage::CWhatToDoPendingPage(CCertificate * pCert)
  16. : CIISWizardPage(CWhatToDoPendingPage::IDD, IDS_CERTWIZ, TRUE),
  17. m_pCert(pCert)
  18. {
  19. //{{AFX_DATA_INIT(CWhatToDoPendingPage)
  20. m_Index = -1;
  21. //}}AFX_DATA_INIT
  22. }
  23. CWhatToDoPendingPage::~CWhatToDoPendingPage()
  24. {
  25. }
  26. void CWhatToDoPendingPage::DoDataExchange(CDataExchange* pDX)
  27. {
  28. CIISWizardPage::DoDataExchange(pDX);
  29. //{{AFX_DATA_MAP(CWhatToDoPendingPage)
  30. DDX_Radio(pDX, IDC_PROCESS_PENDING, m_Index);
  31. //}}AFX_DATA_MAP
  32. }
  33. BOOL
  34. CWhatToDoPendingPage::OnSetActive()
  35. {
  36. m_pCert->SetStatusCode(CCertificate::REQUEST_UNDEFINED);
  37. SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
  38. return CIISWizardPage::OnSetActive();
  39. }
  40. LRESULT
  41. CWhatToDoPendingPage::OnWizardNext()
  42. {
  43. UpdateData();
  44. switch (m_Index)
  45. {
  46. case 0:
  47. m_pCert->SetStatusCode(CCertificate::REQUEST_PROCESS_PENDING);
  48. return IDD_PAGE_NEXT_PROCESS;
  49. case 1:
  50. return IDD_PAGE_NEXT_CANCEL;
  51. default:
  52. ASSERT(FALSE);
  53. }
  54. return 1;
  55. }
  56. LRESULT
  57. CWhatToDoPendingPage::OnWizardBack()
  58. {
  59. return IDD_PAGE_PREV;
  60. }
  61. BEGIN_MESSAGE_MAP(CWhatToDoPendingPage, CIISWizardPage)
  62. //{{AFX_MSG_MAP(CWhatToDoPendingPage)
  63. // NOTE: the ClassWizard will add message map macros here
  64. //}}AFX_MSG_MAP
  65. END_MESSAGE_MAP()
  66. /////////////////////////////////////////////////////////////////////////////
  67. // CWhatToDoPendingPage message handlers
  68. BOOL CWhatToDoPendingPage::OnInitDialog()
  69. {
  70. m_Index = 0;
  71. CIISWizardPage::OnInitDialog();
  72. if ( (this != NULL) && (this->m_hWnd != NULL) )
  73. {
  74. if (GetDlgItem(IDC_PROCESS_PENDING))
  75. {
  76. GetDlgItem(IDC_PROCESS_PENDING)->SetFocus();
  77. }
  78. }
  79. return FALSE;
  80. }