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.

189 lines
4.7 KiB

  1. //
  2. // Driver Verifier UI
  3. // Copyright (c) Microsoft Corporation, 1999
  4. //
  5. //
  6. //
  7. // module: DStsPage.h
  8. // author: DMihai
  9. // created: 11/1/00
  10. //
  11. // Description:
  12. //
  13. #if !defined(AFX_DRIVERSTATUSPAGE_H__24C9AD87_924A_4E7B_99D3_A69947701E74__INCLUDED_)
  14. #define AFX_DRIVERSTATUSPAGE_H__24C9AD87_924A_4E7B_99D3_A69947701E74__INCLUDED_
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif // _MSC_VER > 1000
  18. // DriverStatusPage.h : header file
  19. //
  20. #include "VerfPage.h"
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CDriverStatusPage dialog
  23. class CDriverStatusPage : public CVerifierPropertyPage
  24. {
  25. DECLARE_DYNCREATE(CDriverStatusPage)
  26. // Construction
  27. public:
  28. CDriverStatusPage();
  29. ~CDriverStatusPage();
  30. protected:
  31. //
  32. // Data
  33. //
  34. CPropertySheet *m_pParentSheet;
  35. //
  36. // Runtime data (obtained from the kernel)
  37. //
  38. CRuntimeVerifierData m_RuntimeVerifierData;
  39. //
  40. // Driver list sort parameters
  41. //
  42. INT m_nSortColumnIndexDrv; // sort by name (0) or by status (1)
  43. BOOL m_bAscendDrvNameSort; // sort ascendent by name
  44. BOOL m_bAscendDrvStatusSort; // sort ascendent by status
  45. //
  46. // Settings bits sort parameters
  47. //
  48. INT m_nSortColumnIndexSettbits; // sort by enabled/disabled (0) or by bit name (1)
  49. BOOL m_bAscendSortEnabledBits; // sort ascendent by enabled/disabled
  50. BOOL m_bAscendSortNameBits; // sort ascendent by bit name
  51. //
  52. // Timer handler, returned by SetTimer()
  53. //
  54. UINT_PTR m_uTimerHandler;
  55. BOOL m_bTimerBlocked;
  56. //
  57. // Dialog Data
  58. //
  59. //{{AFX_DATA(CDriverStatusPage)
  60. enum { IDD = IDD_DRVSTATUS_STAT_PAGE };
  61. CListCtrl m_SettBitsList;
  62. CStatic m_NextDescription;
  63. CListCtrl m_DriversList;
  64. //}}AFX_DATA
  65. public:
  66. //
  67. // Methods
  68. //
  69. VOID SetParentSheet( CPropertySheet *pParentSheet )
  70. {
  71. m_pParentSheet = pParentSheet;
  72. ASSERT( m_pParentSheet != NULL );
  73. }
  74. protected:
  75. VOID RefreshInfo();
  76. //
  77. // Driver status list control methods
  78. //
  79. VOID SetupListHeaderDrivers();
  80. VOID FillTheListDrivers();
  81. VOID UpdateStatusColumnDrivers( INT_PTR nItemIndex, INT_PTR nCrtDriver );
  82. VOID SortTheListDrivers();
  83. static int CALLBACK DrvStatusCmpFunc(
  84. LPARAM lParam1,
  85. LPARAM lParam2,
  86. LPARAM lParamSort);
  87. static int CALLBACK DrvNameCmpFunc(
  88. LPARAM lParam1,
  89. LPARAM lParam2,
  90. LPARAM lParamSort);
  91. //
  92. // Settings bits list control methods
  93. //
  94. VOID SetupListHeaderSettBits();
  95. VOID FillTheListSettBits();
  96. VOID AddListItemSettBits( INT nItemData, BOOL bEnabled, ULONG uIdResourceString );
  97. VOID UpdateStatusColumnSettBits( INT nIndexInList, BOOL bEnabled );
  98. VOID RefreshListSettBits();
  99. VOID SortTheListSettBits();
  100. BOOL SettbitsGetBitName( LPARAM lItemData,
  101. TCHAR *szBitName,
  102. ULONG uBitNameBufferLen );
  103. BOOL IsSettBitEnabled( INT_PTR nBitIndex );
  104. static int CALLBACK SettbitsEnabledCmpFunc(
  105. LPARAM lParam1,
  106. LPARAM lParam2,
  107. LPARAM lParamSort);
  108. static int CALLBACK SettbitsNameCmpFunc(
  109. LPARAM lParam1,
  110. LPARAM lParam2,
  111. LPARAM lParamSort);
  112. protected:
  113. //
  114. // Overrides
  115. //
  116. //
  117. // All the property pages derived from this class should
  118. // provide these methods.
  119. //
  120. virtual ULONG GetDialogId() const { return IDD; }
  121. //
  122. // ClassWizard generate virtual function overrides
  123. //
  124. //{{AFX_VIRTUAL(CDriverStatusPage)
  125. public:
  126. virtual BOOL OnSetActive();
  127. virtual LRESULT OnWizardNext();
  128. protected:
  129. virtual VOID DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  130. //}}AFX_VIRTUAL
  131. // Implementation
  132. protected:
  133. // Generated message map functions
  134. //{{AFX_MSG(CDriverStatusPage)
  135. virtual BOOL OnInitDialog();
  136. afx_msg VOID OnColumnclickCrtstatDriversList(NMHDR* pNMHDR, LRESULT* pResult);
  137. afx_msg VOID OnTimer(UINT nIDEvent);
  138. afx_msg void OnChsettButton();
  139. afx_msg void OnAdddrvButton();
  140. afx_msg void OnRemdrvtButton();
  141. afx_msg void OnColumnclickCrtstatSettbitsList(NMHDR* pNMHDR, LRESULT* pResult);
  142. afx_msg LONG OnHelp( WPARAM wParam, LPARAM lParam );
  143. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  144. //}}AFX_MSG
  145. DECLARE_MESSAGE_MAP()
  146. };
  147. //{{AFX_INSERT_LOCATION}}
  148. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  149. #endif // !defined(AFX_DRIVERSTATUSPAGE_H__24C9AD87_924A_4E7B_99D3_A69947701E74__INCLUDED_)