OptionsSheet.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // OptionsSheet.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "CP_Main.h"
  5. #include "OptionsSheet.h"
  6. #include "OptionsKeyBoard.h"
  7. #include "OptionsGeneral.h"
  8. #include "OptionsQuickPaste.h"
  9. #include "OptionsStats.h"
  10. #include "OptionsTypes.h"
  11. #include "About.h"
  12. #include "OptionFriends.h"
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. /////////////////////////////////////////////////////////////////////////////
  19. // COptionsSheet
  20. IMPLEMENT_DYNAMIC(COptionsSheet, CPropertySheet)
  21. COptionsSheet::COptionsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
  22. :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
  23. {
  24. m_pKeyBoardOptions = NULL;
  25. m_pGeneralOptions = NULL;
  26. m_pQuickPasteOptions = NULL;
  27. m_pUtilites = NULL;
  28. m_pStats = NULL;
  29. m_pTypes = NULL;
  30. m_pAbout = NULL;
  31. m_pFriends = NULL;
  32. }
  33. COptionsSheet::~COptionsSheet()
  34. {
  35. DELETE_PTR(m_pKeyBoardOptions);
  36. DELETE_PTR(m_pGeneralOptions);
  37. DELETE_PTR(m_pQuickPasteOptions);
  38. DELETE_PTR(m_pUtilites);
  39. DELETE_PTR(m_pStats);
  40. DELETE_PTR(m_pTypes);
  41. DELETE_PTR(m_pAbout);
  42. DELETE_PTR(m_pFriends);
  43. }
  44. BEGIN_MESSAGE_MAP(COptionsSheet, CPropertySheet)
  45. //{{AFX_MSG_MAP(COptionsSheet)
  46. // NOTE - the ClassWizard will add and remove mapping macros here.
  47. //}}AFX_MSG_MAP
  48. END_MESSAGE_MAP()
  49. /////////////////////////////////////////////////////////////////////////////
  50. // COptionsSheet message handlers
  51. int COptionsSheet::DoModal()
  52. {
  53. EnableStackedTabs(TRUE);
  54. m_pGeneralOptions = new COptionsGeneral;
  55. m_pKeyBoardOptions = new COptionsKeyBoard;
  56. m_pQuickPasteOptions = new COptionsQuickPaste;
  57. m_pFriends = new COptionFriends;
  58. m_pStats = new COptionsStats;
  59. m_pTypes = new COptionsTypes;
  60. m_pAbout = new CAbout;
  61. AddPage(m_pGeneralOptions);
  62. AddPage(m_pTypes);
  63. AddPage(m_pKeyBoardOptions);
  64. AddPage(m_pQuickPasteOptions);
  65. AddPage(m_pFriends);
  66. AddPage(m_pStats);
  67. AddPage(m_pAbout);
  68. return CPropertySheet::DoModal();
  69. }
  70. BOOL COptionsSheet::OnInitDialog()
  71. {
  72. BOOL bResult = CPropertySheet::OnInitDialog();
  73. SetWindowText(_T("Ditto"));
  74. theApp.m_Language.UpdateOptionsSheet(this);
  75. return bResult;
  76. }