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.

77 lines
1.5 KiB

  1. // gensheet.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "afxcmn.h"
  5. #include "ISAdmin.h"
  6. #include "gensheet.h"
  7. #include "genpage.h"
  8. #include "compage1.h"
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CGENSHEET
  15. IMPLEMENT_DYNAMIC(CGENSHEET, CPropertySheet)
  16. CGENSHEET::CGENSHEET(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
  17. :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
  18. {
  19. }
  20. CGENSHEET::CGENSHEET(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
  21. :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
  22. {
  23. }
  24. CGENSHEET::~CGENSHEET()
  25. {
  26. }
  27. BEGIN_MESSAGE_MAP(CGENSHEET, CPropertySheet)
  28. //{{AFX_MSG_MAP(CGENSHEET)
  29. ON_BN_CLICKED (ID_APPLY_NOW, OnApplyNow)
  30. ON_COMMAND(ID_HELP, OnHelp)
  31. //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CGENSHEET message handlers
  35. void CGENSHEET::OnApplyNow ()
  36. {
  37. if (GetActivePage ()->UpdateData (TRUE))
  38. SavePageData();
  39. }
  40. void CGENSHEET::SavePageData ()
  41. {
  42. CGenPage * pPage = NULL;
  43. for (int i = 0; i < GetPageCount(); ++i)
  44. {
  45. pPage = (CGenPage *)GetPage(i);
  46. ASSERT(pPage != NULL);
  47. //
  48. // Update the data in each page and save
  49. //
  50. pPage->SaveInfo();
  51. }
  52. }
  53. void CGENSHEET::OnHelp()
  54. {
  55. // TODO: Add your command handler code here
  56. AfxGetApp()->WinHelp(0x20080);
  57. }