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.

179 lines
4.5 KiB

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