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.

227 lines
6.1 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. PropPage.h
  5. Abstract:
  6. Generic Property Page base class.
  7. Author:
  8. Rohde Wakefield [rohde] 04-Aug-1997
  9. Revision History:
  10. --*/
  11. #ifndef _PROPPAGE_H
  12. #define _PROPPAGE_H
  13. #pragma once
  14. #define IDC_WIZ_TITLE 32000
  15. #define IDC_WIZ_SUBTITLE 32001
  16. #define IDC_WIZ_FINAL_TEXT 32006
  17. #define IDS_WIZ_WINGDING_FONTSIZE 32100
  18. #define IDS_WIZ_TITLE1_FONTNAME 32101
  19. #define IDS_WIZ_TITLE1_FONTSIZE 32102
  20. #ifndef RC_INVOKED
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CRsDialog dialog
  23. class CRsDialog : public CDialog
  24. {
  25. // Construction
  26. public:
  27. CRsDialog( UINT nIDTemplate, CWnd* pParent = NULL); // standard constructor
  28. ~CRsDialog();
  29. // Dialog Data
  30. //{{AFX_DATA(CRsDialog)
  31. // NOTE - ClassWizard will add data members here.
  32. // DO NOT EDIT what you see in these blocks of generated code !
  33. //}}AFX_DATA
  34. // Overrides
  35. // ClassWizard generate virtual function overrides
  36. //{{AFX_VIRTUAL(CRsDialog)
  37. protected:
  38. //}}AFX_VIRTUAL
  39. protected:
  40. const DWORD * m_pHelpIds;
  41. // Generated message map functions
  42. //{{AFX_MSG(CRsDialog)
  43. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  44. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  45. //}}AFX_MSG
  46. DECLARE_MESSAGE_MAP()
  47. };
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CRsPropertyPage dialog
  50. class CRsPropertyPage : public CPropertyPage
  51. {
  52. // Construction
  53. public:
  54. CRsPropertyPage( UINT nIDTemplate, UINT nIDCaption = 0 );
  55. ~CRsPropertyPage();
  56. // Dialog Data
  57. //{{AFX_DATA(CRsPropertyPage)
  58. // NOTE - ClassWizard will add data members here.
  59. // DO NOT EDIT what you see in these blocks of generated code !
  60. //}}AFX_DATA
  61. // Overrides
  62. // ClassWizard generate virtual function overrides
  63. //{{AFX_VIRTUAL(CRsPropertyPage)
  64. protected:
  65. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  66. //}}AFX_VIRTUAL
  67. // Implementation
  68. LPFNPSPCALLBACK m_pMfcCallback; // Original MFC callback from psp
  69. static UINT CALLBACK PropPageCallback( HWND hWnd, UINT uMessage, LPPROPSHEETPAGE ppsp );
  70. virtual void OnPageCreate( ) { };
  71. virtual void OnPageRelease( ) { delete this; };
  72. #define RSPROPPAGE_FONT_DECL(name) \
  73. static CFont m_##name##Font; \
  74. CFont* Get##name##Font( void );\
  75. void Init##name##Font( void );
  76. RSPROPPAGE_FONT_DECL( Shell )
  77. RSPROPPAGE_FONT_DECL( BoldShell )
  78. RSPROPPAGE_FONT_DECL( WingDing )
  79. RSPROPPAGE_FONT_DECL( LargeTitle )
  80. RSPROPPAGE_FONT_DECL( SmallTitle )
  81. LPCTSTR GetWingDingFontName( ) { return( _T("Marlett") ); };
  82. LPCTSTR GetWingDingCheckChar( ) { return( _T("b") ); };
  83. LPCTSTR GetWingDingExChar( ) { return( _T("r") ); };
  84. protected:
  85. const DWORD * m_pHelpIds;
  86. // Generated message map functions
  87. //{{AFX_MSG(CRsPropertyPage)
  88. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  89. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  90. //}}AFX_MSG
  91. DECLARE_MESSAGE_MAP()
  92. };
  93. //
  94. // The following is to work around MFC not supporting Wiz97 pages.
  95. // We create our own struct which is the correct Wiz97 struct and
  96. // on creation do the "right thing" (copy over old PSP into new PSP
  97. // and do the create). This is adapted from prsht.h in sdk\inc
  98. //
  99. typedef struct _PROPSHEETPAGEW97 {
  100. DWORD dwSize;
  101. DWORD dwFlags;
  102. HINSTANCE hInstance;
  103. union {
  104. LPCWSTR pszTemplate;
  105. #ifdef _WIN32
  106. LPCDLGTEMPLATE pResource;
  107. #else
  108. const VOID FAR *pResource;
  109. #endif
  110. }DUMMYUNIONNAME;
  111. union {
  112. HICON hIcon;
  113. LPCWSTR pszIcon;
  114. }DUMMYUNIONNAME2;
  115. LPCWSTR pszTitle;
  116. DLGPROC pfnDlgProc;
  117. LPARAM lParam;
  118. LPFNPSPCALLBACKW pfnCallback;
  119. UINT FAR * pcRefParent;
  120. //#if (_WIN32_IE >= 0x0400)
  121. LPCWSTR pszHeaderTitle; // this is displayed in the header
  122. LPCWSTR pszHeaderSubTitle; ///
  123. //#endif
  124. } PROPSHEETPAGEW97, FAR *LPPROPSHEETPAGEW97;
  125. #ifndef PSP_HIDEHEADER
  126. # define PSP_HIDEHEADER 0x00000800
  127. # define PSP_USEHEADERTITLE 0x00001000
  128. # define PSP_USEHEADERSUBTITLE 0x00002000
  129. #endif
  130. //
  131. // Constructor wrapper macros to allow easy description of dialog resource and
  132. // associated string resources
  133. //
  134. #define CRsWizardPage_InitBaseInt( DlgId ) CRsWizardPage( IDD_##DlgId, FALSE, IDS_##DlgId##_TITLE, IDS_##DlgId##_SUBTITLE )
  135. #define CRsWizardPage_InitBaseExt( DlgId ) CRsWizardPage( IDD_##DlgId, TRUE )
  136. class CRsWizardPage : public CRsPropertyPage
  137. {
  138. public:
  139. CRsWizardPage( UINT nIDTemplate, BOOL bExterior = FALSE, UINT nIdTitle = 0, UINT nIdSubtitle = 0 );
  140. virtual ~CRsWizardPage();
  141. // Dialog Data
  142. //{{AFX_DATA(CRsWizardPage)
  143. // NOTE - ClassWizard will add data members here.
  144. // DO NOT EDIT what you see in these blocks of generated code !
  145. //}}AFX_DATA
  146. // Overrides
  147. // ClassWizard generate virtual function overrides
  148. //{{AFX_VIRTUAL(CRsWizardPage)
  149. protected:
  150. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  151. //}}AFX_VIRTUAL
  152. PROPSHEETPAGEW97 m_psp97;
  153. BOOL m_ExteriorPage;
  154. UINT m_TitleId,
  155. m_SubtitleId;
  156. CString m_Title,
  157. m_SubTitle;
  158. protected:
  159. // Generated message map functions
  160. //{{AFX_MSG(CRsWizardPage)
  161. virtual BOOL OnInitDialog();
  162. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  163. //}}AFX_MSG
  164. DECLARE_MESSAGE_MAP()
  165. public:
  166. void SetCaption( CString& strCaption );
  167. HPROPSHEETPAGE CreatePropertyPage( );
  168. };
  169. //{{AFX_INSERT_LOCATION}}
  170. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  171. //}}AFX
  172. #endif // !RC_INVOKED
  173. #endif