OptionsSheet.cpp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. #include "OptionsCopyBuffers.h"
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19. /////////////////////////////////////////////////////////////////////////////
  20. // COptionsSheet
  21. IMPLEMENT_DYNAMIC(COptionsSheet, CPropertySheet)
  22. COptionsSheet::COptionsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
  23. :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
  24. {
  25. m_pKeyBoardOptions = NULL;
  26. m_pGeneralOptions = NULL;
  27. m_pQuickPasteOptions = NULL;
  28. m_pUtilites = NULL;
  29. m_pStats = NULL;
  30. m_pTypes = NULL;
  31. m_pAbout = NULL;
  32. m_pFriends = NULL;
  33. m_pCopyBuffers = NULL;
  34. }
  35. COptionsSheet::~COptionsSheet()
  36. {
  37. DELETE_PTR(m_pKeyBoardOptions);
  38. DELETE_PTR(m_pGeneralOptions);
  39. DELETE_PTR(m_pQuickPasteOptions);
  40. DELETE_PTR(m_pUtilites);
  41. DELETE_PTR(m_pStats);
  42. DELETE_PTR(m_pTypes);
  43. DELETE_PTR(m_pAbout);
  44. DELETE_PTR(m_pFriends);
  45. DELETE_PTR(m_pCopyBuffers);
  46. }
  47. BEGIN_MESSAGE_MAP(COptionsSheet, CPropertySheet)
  48. //{{AFX_MSG_MAP(COptionsSheet)
  49. // NOTE - the ClassWizard will add and remove mapping macros here.
  50. //}}AFX_MSG_MAP
  51. END_MESSAGE_MAP()
  52. /////////////////////////////////////////////////////////////////////////////
  53. // COptionsSheet message handlers
  54. int COptionsSheet::DoModal()
  55. {
  56. EnableStackedTabs(TRUE);
  57. m_pGeneralOptions = new COptionsGeneral;
  58. m_pKeyBoardOptions = new COptionsKeyBoard;
  59. m_pQuickPasteOptions = new COptionsQuickPaste;
  60. m_pFriends = new COptionFriends;
  61. m_pCopyBuffers = new COptionsCopyBuffers;
  62. m_pStats = new COptionsStats;
  63. m_pTypes = new COptionsTypes;
  64. m_pAbout = new CAbout;
  65. AddPage(m_pGeneralOptions);
  66. AddPage(m_pTypes);
  67. AddPage(m_pKeyBoardOptions);
  68. AddPage(m_pCopyBuffers);
  69. AddPage(m_pQuickPasteOptions);
  70. AddPage(m_pFriends);
  71. AddPage(m_pStats);
  72. AddPage(m_pAbout);
  73. return CPropertySheet::DoModal();
  74. }
  75. BOOL COptionsSheet::OnInitDialog()
  76. {
  77. BOOL bResult = CPropertySheet::OnInitDialog();
  78. SetWindowText(_T("Ditto"));
  79. theApp.m_Language.UpdateOptionsSheet(this);
  80. return bResult;
  81. }