Source code of Windows XP (NT5)
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.

164 lines
5.2 KiB

  1. /*++
  2. Copyright (C) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. smproppg.h
  5. Abstract:
  6. Class definitions for the property page base class.
  7. --*/
  8. #ifndef _SMPROPPG_H_
  9. #define _SMPROPPG_H_
  10. #if _MSC_VER >= 1000
  11. #pragma once
  12. #endif // _MSC_VER >= 1000
  13. #include "smlogqry.h" // For shared data
  14. #define MAXSTR 32
  15. #define INVALID_DWORD -2 // SLQ_DISK_MAX_SIZE = -1
  16. #define INVALID_DOUBLE -1.00
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CSmPropertyPage dialog
  19. #define VALIDATE_FOCUS 1
  20. #define VALIDATE_APPLY 2
  21. class CSmPropertyPage : public CPropertyPage
  22. {
  23. DECLARE_DYNCREATE(CSmPropertyPage)
  24. // Construction
  25. public:
  26. CSmPropertyPage();
  27. CSmPropertyPage (
  28. UINT nIDTemplate,
  29. LONG_PTR hConsole = NULL,
  30. LPDATAOBJECT pDataObject = NULL );
  31. virtual ~CSmPropertyPage();
  32. public:
  33. static UINT CALLBACK PropSheetPageProc( HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp );
  34. DWORD SetContextHelpFilePath ( const CString& rstrPath );
  35. const CString& GetContextHelpFilePath ( void ) { return m_strContextHelpFilePath; };
  36. void SetModifiedPage ( const BOOL bModified = TRUE );
  37. DWORD AllocInitCounterPath(
  38. const LPTSTR szCounterPath,
  39. PPDH_COUNTER_PATH_ELEMENTS* ppCounter );
  40. // Dialog Data
  41. //{{AFX_DATA(CSmPropertyPage)
  42. // DO NOT EDIT what you see in these blocks of generated code !
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generate virtual function overrides
  46. //{{AFX_VIRTUAL(CSmPropertyPage)
  47. public:
  48. protected:
  49. virtual BOOL OnInitDialog();
  50. virtual BOOL OnSetActive();
  51. //}}AFX_VIRTUAL
  52. public:
  53. LPFNPSPCALLBACK m_pfnOriginalCallback;
  54. // Implementation
  55. protected:
  56. // Generated message map functions
  57. //{{AFX_MSG(CSmPropertyPage)
  58. virtual BOOL OnHelpInfo( HELPINFO* );
  59. virtual void OnContextMenu( CWnd*, CPoint );
  60. //}}AFX_MSG
  61. DECLARE_MESSAGE_MAP()
  62. // Generated OLE dispatch map functions
  63. //{{AFX_DISPATCH(CCountersProperty)
  64. // NOTE - the ClassWizard will add and remove member functions here.
  65. //}}AFX_DISPATCH
  66. // DECLARE_DISPATCH_MAP()
  67. // DECLARE_INTERFACE_MAP()
  68. protected:
  69. enum eStartType {
  70. eStartManually,
  71. eStartImmediately,
  72. eStartSched
  73. };
  74. void SetRunAs( CSmLogQuery* pQuery );
  75. BOOL Initialize(CSmLogQuery* pQuery);
  76. eStartType DetermineCurrentStartType ( void );
  77. virtual INT GetFirstHelpCtrlId ( void ) { ASSERT ( FALSE ); return 0; }; // Subclass must override.
  78. BOOL IsValidData ( CSmLogQuery* pQuery, DWORD fReason );
  79. virtual BOOL IsValidLocalData() { return TRUE; }
  80. BOOL Apply( CSmLogQuery* pQuery );
  81. BOOL IsActive( void ) { return m_bIsActive; };
  82. void SetIsActive( BOOL bIsActive ) { m_bIsActive = bIsActive; };
  83. BOOL UpdateService( CSmLogQuery* pQuery, BOOL bSyncSerial = FALSE );
  84. void SetHelpIds ( DWORD* pdwHelpIds ) { m_pdwHelpIds = pdwHelpIds; };
  85. BOOL IsModifiedPage( void ) { return m_bIsModifiedPage; };
  86. void ValidateTextEdit(CDataExchange * pDX,
  87. int nIDC,
  88. int nMaxChars,
  89. DWORD * value,
  90. DWORD minValue,
  91. DWORD maxValue);
  92. BOOL ValidateDWordInterval(int nIDC,
  93. LPCWSTR strLogName,
  94. long lValue,
  95. DWORD minValue,
  96. DWORD maxValue);
  97. void OnDeltaposSpin(NMHDR * pNMHDR,
  98. LRESULT * pResult,
  99. DWORD * pValue,
  100. DWORD dMinValue,
  101. DWORD dMaxValue);
  102. BOOL SampleTimeIsLessThanSessionTime( CSmLogQuery* pQuery );
  103. BOOL SampleIntervalIsInRange( SLQ_TIME_INFO&, const CString& );
  104. BOOL IsWritableQuery( CSmLogQuery* pQuery );
  105. BOOL ConnectRemoteWbemFail(CSmLogQuery* pQuery, BOOL bNotTouchRunAs);
  106. CWnd* GetRunAsWindow();
  107. SLQ_PROP_PAGE_SHARED m_SharedData;
  108. HINSTANCE m_hModule;
  109. LPDATAOBJECT m_pDataObject;
  110. CString m_strUserDisplay; // For RunAs
  111. CString m_strUserSaved;
  112. BOOL m_bCanAccessRemoteWbem;
  113. BOOL m_bPwdButtonEnabled;
  114. private:
  115. LONG_PTR m_hConsole;
  116. BOOL m_bIsActive;
  117. CString m_strContextHelpFilePath;
  118. DWORD* m_pdwHelpIds;
  119. BOOL m_bIsModifiedPage;
  120. };
  121. //{{AFX_INSERT_LOCATION}}
  122. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  123. #endif // _SMPROPPG_H_