1
0

OptionsSheet.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 "OptionsUtilities.h"
  10. #include "OptionsStats.h"
  11. #include "OptionsTypes.h"
  12. #include "About.h"
  13. #include "OptionFriends.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. }
  34. COptionsSheet::~COptionsSheet()
  35. {
  36. DELETE_PTR(m_pKeyBoardOptions);
  37. DELETE_PTR(m_pGeneralOptions);
  38. DELETE_PTR(m_pQuickPasteOptions);
  39. DELETE_PTR(m_pUtilites);
  40. DELETE_PTR(m_pStats);
  41. DELETE_PTR(m_pTypes);
  42. DELETE_PTR(m_pAbout);
  43. DELETE_PTR(m_pFriends);
  44. }
  45. BEGIN_MESSAGE_MAP(COptionsSheet, CPropertySheet)
  46. //{{AFX_MSG_MAP(COptionsSheet)
  47. // NOTE - the ClassWizard will add and remove mapping macros here.
  48. //}}AFX_MSG_MAP
  49. END_MESSAGE_MAP()
  50. /////////////////////////////////////////////////////////////////////////////
  51. // COptionsSheet message handlers
  52. int COptionsSheet::DoModal()
  53. {
  54. EnableStackedTabs(TRUE);
  55. m_pGeneralOptions = new COptionsGeneral;
  56. m_pKeyBoardOptions = new COptionsKeyBoard;
  57. m_pQuickPasteOptions = new COptionsQuickPaste;
  58. m_pFriends = new COptionFriends;
  59. m_pStats = new COptionsStats;
  60. m_pTypes = new COptionsTypes;
  61. m_pAbout = new CAbout;
  62. AddPage(m_pGeneralOptions);
  63. AddPage(m_pTypes);
  64. AddPage(m_pKeyBoardOptions);
  65. AddPage(m_pQuickPasteOptions);
  66. AddPage(m_pFriends);
  67. AddPage(m_pStats);
  68. AddPage(m_pAbout);
  69. return CPropertySheet::DoModal();
  70. }
  71. BOOL COptionsSheet::OnInitDialog()
  72. {
  73. BOOL bResult = CPropertySheet::OnInitDialog();
  74. SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
  75. SetWindowText("Ditto");
  76. theApp.m_Language.UpdateOptionsSheet(this);
  77. return bResult;
  78. }