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.

173 lines
3.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 2000
  4. Module Name:
  5. Dialog.h
  6. Abstract:
  7. Header file for the CIASDialog template class.
  8. Author:
  9. Michael A. Maguire 02/03/98
  10. Revision History:
  11. mmaguire 02/03/98 - abstracted from CAddClientDialog class
  12. tperraut 08/2000 - added CHelpPageEx
  13. --*/
  14. //////////////////////////////////////////////////////////////////////////////
  15. #if !defined(_DLG_CS_HELP_H_)
  16. #define _DLG_CS_HELP_H_
  17. //////////////////////////////////////////////////////////////////////////////
  18. // BEGIN INCLUDES
  19. //
  20. // where we can find what this class derives from:
  21. //
  22. //
  23. //
  24. // where we can find what this class has or uses:
  25. //
  26. //
  27. // END INCLUDES
  28. //////////////////////////////////////////////////////////////////////////////
  29. //=============================================================================
  30. // Global Help Table for many Dialog IDs
  31. //
  32. #include <afxdlgs.h>
  33. #include "hlptable.h"
  34. //=============================================================================
  35. // Dialog that handles Context Help -- uses MFC
  36. //
  37. class CHelpDialog : public CDialog // talk back to property sheet
  38. {
  39. DECLARE_DYNCREATE(CHelpDialog)
  40. // Implementation
  41. protected:
  42. // Generated message map functions
  43. //{{AFX_MSG(CHelpDialog)
  44. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  45. afx_msg void OnContextMenu(CWnd* pWnd, ::CPoint point);
  46. //}}AFX_MSG
  47. DECLARE_MESSAGE_MAP()
  48. public:
  49. CHelpDialog(UINT nIDTemplate = 0, CWnd* pParent = NULL) : CDialog(nIDTemplate, pParent)
  50. {
  51. SET_HELP_TABLE(nIDTemplate);
  52. };
  53. protected:
  54. #ifdef _DEBUG
  55. virtual void Dump( CDumpContext& dc ) const
  56. {
  57. dc << _T("CHelpDialog");
  58. };
  59. #endif
  60. protected:
  61. const DWORD* m_pHelpTable;
  62. };
  63. //=============================================================================
  64. // Page that handles Context Help, -- USING MFC
  65. //
  66. class CHelpPage : public CPropertyPage // talk back to property sheet
  67. {
  68. // Implementation
  69. protected:
  70. // Generated message map functions
  71. //{{AFX_MSG(CHelpPage)
  72. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  73. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  74. //}}AFX_MSG
  75. DECLARE_MESSAGE_MAP()
  76. public:
  77. CHelpPage(UINT nIDTemplate = 0) : CPropertyPage(nIDTemplate)
  78. {
  79. SET_HELP_TABLE(nIDTemplate);
  80. };
  81. #ifdef _DEBUG
  82. virtual void Dump( CDumpContext& dc ) const
  83. {
  84. dc << _T("CHelpPage");
  85. };
  86. #endif
  87. protected:
  88. const DWORD* m_pHelpTable;
  89. };
  90. //=============================================================================
  91. // Page that handles Context Help, -- USING MFC
  92. //
  93. class CHelpPageEx : public CPropertyPageEx // talk back to property sheet
  94. {
  95. // Implementation
  96. protected:
  97. // Generated message map functions
  98. //{{AFX_MSG(CHelpPageEx)
  99. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  100. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  101. //}}AFX_MSG
  102. DECLARE_MESSAGE_MAP()
  103. public:
  104. CHelpPageEx(UINT nIDTemplate = 0, bool helpEnabled = true)
  105. : CPropertyPageEx(nIDTemplate),
  106. m_bHelpEnabled(helpEnabled)
  107. {
  108. if (m_bHelpEnabled)
  109. {
  110. SET_HELP_TABLE(nIDTemplate);
  111. }
  112. };
  113. CHelpPageEx(
  114. UINT nIDTemplate,
  115. UINT nIDCaption = 0,
  116. UINT nIDHeaderTitle = 0,
  117. UINT nIDHeaderSubTitle = 0,
  118. bool helpEnabled = true)
  119. : CPropertyPageEx(nIDTemplate, nIDCaption, nIDHeaderTitle, nIDHeaderSubTitle),
  120. m_bHelpEnabled(helpEnabled)
  121. {
  122. if (m_bHelpEnabled)
  123. {
  124. SET_HELP_TABLE(nIDTemplate);
  125. }
  126. };
  127. #ifdef _DEBUG
  128. virtual void Dump( CDumpContext& dc ) const
  129. {
  130. dc << _T("CHelpPageEx");
  131. };
  132. #endif
  133. protected:
  134. const DWORD* m_pHelpTable;
  135. bool m_bHelpEnabled;
  136. };
  137. #endif // _DLG_CS_HELP_H_