OptionsSheet.cpp 2.0 KB

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