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.

101 lines
2.7 KiB

  1. // docopt.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. #include "stdafx.h"
  13. #include "wordpad.h"
  14. #include "docopt.h"
  15. #include "helpids.h"
  16. #ifdef _DEBUG
  17. #undef THIS_FILE
  18. static char BASED_CODE THIS_FILE[] = __FILE__;
  19. #endif
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CDocOptPage property page
  22. const DWORD CDocOptPage::m_nHelpIDs[] =
  23. {
  24. IDC_BOX, (DWORD) -1,
  25. IDC_WRAP_NONE, IDH_WORDPAD_WRAP_NO,
  26. IDC_WRAP_WINDOW, IDH_WORDPAD_WRAP_WINDOW,
  27. IDC_WRAP_RULER, IDH_WORDPAD_WRAP_RULER,
  28. IDC_BOXT, (DWORD) -1,
  29. IDC_CHECK_TOOLBAR, IDH_WORDPAD_CHECK_TOOLBAR,
  30. IDC_CHECK_FORMATBAR, IDH_WORDPAD_CHECK_FORMATBAR,
  31. IDC_CHECK_STATUSBAR, IDH_WORDPAD_CHECK_STATUSBAR,
  32. IDC_CHECK_RULERBAR, IDH_WORDPAD_CHECK_RULERBAR,
  33. AFX_IDC_TAB_CONTROL, (DWORD) -1,
  34. 0, 0
  35. };
  36. CDocOptPage::CDocOptPage() : CCSPropertyPage(CDocOptPage::IDD)
  37. {
  38. //{{AFX_DATA_INIT(CDocOptPage)
  39. m_nWordWrap = -1;
  40. m_bFormatBar = FALSE;
  41. m_bRulerBar = FALSE;
  42. m_bStatusBar = FALSE;
  43. m_bToolBar = FALSE;
  44. //}}AFX_DATA_INIT
  45. }
  46. CDocOptPage::CDocOptPage(UINT nIDCaption) :
  47. CCSPropertyPage(CDocOptPage::IDD, nIDCaption)
  48. {
  49. m_nWordWrap = -1;
  50. m_bFormatBar = FALSE;
  51. m_bRulerBar = FALSE;
  52. m_bStatusBar = FALSE;
  53. m_bToolBar = FALSE;
  54. }
  55. CDocOptPage::~CDocOptPage()
  56. {
  57. }
  58. void CDocOptPage::DoDataExchange(CDataExchange* pDX)
  59. {
  60. CCSPropertyPage::DoDataExchange(pDX);
  61. //{{AFX_DATA_MAP(CDocOptPage)
  62. DDX_Radio(pDX, IDC_WRAP_NONE, m_nWordWrap);
  63. DDX_Check(pDX, IDC_CHECK_FORMATBAR, m_bFormatBar);
  64. DDX_Check(pDX, IDC_CHECK_RULERBAR, m_bRulerBar);
  65. DDX_Check(pDX, IDC_CHECK_STATUSBAR, m_bStatusBar);
  66. DDX_Check(pDX, IDC_CHECK_TOOLBAR, m_bToolBar);
  67. //}}AFX_DATA_MAP
  68. }
  69. BEGIN_MESSAGE_MAP(CDocOptPage, CCSPropertyPage)
  70. //{{AFX_MSG_MAP(CDocOptPage)
  71. // NOTE: the ClassWizard will add message map macros here
  72. //}}AFX_MSG_MAP
  73. END_MESSAGE_MAP()
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CDocOptPage message handlers
  76. /////////////////////////////////////////////////////////////////////////////
  77. // CEmbeddedOptPage property page
  78. CEmbeddedOptPage::CEmbeddedOptPage() : CDocOptPage(IDS_EMBEDDED_OPTIONS)
  79. {
  80. }
  81. BOOL CEmbeddedOptPage::OnInitDialog()
  82. {
  83. BOOL b = CDocOptPage::OnInitDialog();
  84. GetDlgItem(IDC_CHECK_STATUSBAR)->ShowWindow(SW_HIDE);
  85. return b;
  86. }