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.

103 lines
2.8 KiB

  1. // WizLast.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "WizLast.h"
  5. #ifdef _DEBUG
  6. #define new DEBUG_NEW
  7. #undef THIS_FILE
  8. static char THIS_FILE[] = __FILE__;
  9. #endif
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CWizFinish property page
  12. IMPLEMENT_DYNCREATE(CWizFinish, CPropertyPageEx)
  13. CWizFinish::CWizFinish() : CPropertyPageEx(CWizFinish::IDD)
  14. {
  15. //{{AFX_DATA_INIT(CWizFinish)
  16. // NOTE: the ClassWizard will add member initialization here
  17. //}}AFX_DATA_INIT
  18. m_psp.dwFlags |= PSP_HIDEHEADER;
  19. m_cstrNewFinishButtonText.LoadString(IDS_NEW_FINISHBUTTONTEXT);
  20. }
  21. CWizFinish::~CWizFinish()
  22. {
  23. }
  24. void CWizFinish::DoDataExchange(CDataExchange* pDX)
  25. {
  26. CPropertyPageEx::DoDataExchange(pDX);
  27. //{{AFX_DATA_MAP(CWizFinish)
  28. // NOTE: the ClassWizard will add DDX and DDV calls here
  29. //}}AFX_DATA_MAP
  30. }
  31. BEGIN_MESSAGE_MAP(CWizFinish, CPropertyPageEx)
  32. //{{AFX_MSG_MAP(CWizFinish)
  33. //}}AFX_MSG_MAP
  34. ON_MESSAGE(WM_SETPAGEFOCUS, OnSetPageFocus)
  35. END_MESSAGE_MAP()
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CWizFinish message handlers
  38. BOOL CWizFinish::OnInitDialog()
  39. {
  40. CPropertyPageEx::OnInitDialog();
  41. CShrwizApp *pApp = (CShrwizApp *)AfxGetApp();
  42. GetDlgItem(IDC_FINISH_TITLE)->SendMessage(WM_SETFONT, (WPARAM)pApp->m_hTitleFont, (LPARAM)TRUE);
  43. return TRUE; // return TRUE unless you set the focus to a control
  44. // EXCEPTION: OCX Property Pages should return FALSE
  45. }
  46. BOOL CWizFinish::OnWizardFinish()
  47. {
  48. CShrwizApp *pApp = (CShrwizApp *)AfxGetApp();
  49. if (BST_CHECKED == ((CButton *)GetDlgItem(IDC_MORE_SHARES))->GetCheck())
  50. {
  51. pApp->Reset();
  52. return FALSE;
  53. }
  54. return CPropertyPageEx::OnWizardFinish();
  55. }
  56. BOOL CWizFinish::OnSetActive()
  57. {
  58. CShrwizApp *pApp = (CShrwizApp *)AfxGetApp();
  59. ((CPropertySheet *)GetParent())->SetWizardButtons(PSWIZB_FINISH);
  60. ((CPropertySheet *)GetParent())->SetFinishText(m_cstrNewFinishButtonText); // this hides Back button too
  61. GetParent()->GetDlgItem(ID_WIZBACK)->ShowWindow(SW_HIDE); // to make sure it is hidden
  62. GetParent()->GetDlgItem(IDCANCEL)->EnableWindow(FALSE);
  63. SetDlgItemText(IDC_FINISH_TITLE, pApp->m_cstrFinishTitle);
  64. SetDlgItemText(IDC_FINISH_STATUS, pApp->m_cstrFinishStatus);
  65. SetDlgItemText(IDC_FINISH_SUMMARY, pApp->m_cstrFinishSummary);
  66. BOOL fRet = CPropertyPageEx::OnSetActive();
  67. PostMessage(WM_SETPAGEFOCUS, 0, 0L);
  68. return fRet;
  69. }
  70. //
  71. // Q148388 How to Change Default Control Focus on CPropertyPageEx
  72. //
  73. LRESULT CWizFinish::OnSetPageFocus(WPARAM wParam, LPARAM lParam)
  74. {
  75. GetDlgItem(IDC_MORE_SHARES)->SetFocus();
  76. return 0;
  77. }