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.

134 lines
3.8 KiB

  1. //
  2. // Driver Verifier UI
  3. // Copyright (c) Microsoft Corporation, 1999
  4. //
  5. //
  6. // module: VSetPage.hxx
  7. // author: DMihai
  8. // created: 07/07/99
  9. //
  10. // Description:
  11. //
  12. // Volatile settings PropertyPage.
  13. //
  14. #if !defined(AFX_VSETPAGE_H__5F8AD0D0_A5CA_11D2_98C6_00A0C9A26FFC__INCLUDED_)
  15. #define AFX_VSETPAGE_H__5F8AD0D0_A5CA_11D2_98C6_00A0C9A26FFC__INCLUDED_
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19. // VSetPage.h : header file
  20. //
  21. #include "verify.hxx"
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CVolatileSettPage dialog
  24. class CVolatileSettPage : public CPropertyPage
  25. {
  26. DECLARE_DYNCREATE(CVolatileSettPage)
  27. // Construction
  28. public:
  29. CVolatileSettPage();
  30. ~CVolatileSettPage();
  31. protected:
  32. // type definition
  33. typedef enum tagControlState
  34. {
  35. vrfControlDisabled = 1,
  36. vrfControlEnabled = 2
  37. } VRF_CONTROL_STATE;
  38. protected:
  39. // Dialog Data
  40. //{{AFX_DATA(CVolatileSettPage)
  41. enum { IDD = IDD_VSETTINGS_PAGE };
  42. CListCtrl m_DriversList;
  43. CButton m_PagedCCheck;
  44. CButton m_NormalVerifCheck;
  45. CButton m_AllocFCheck;
  46. CButton m_ApplyButton;
  47. BOOL m_bAllocFCheck;
  48. BOOL m_bNormalCheck;
  49. BOOL m_bPagedCCheck;
  50. int m_nUpdateIntervalIndex;
  51. //}}AFX_DATA
  52. KRN_VERIFIER_STATE m_KrnVerifState; // current settings (obtained from MemMgmt)
  53. VRF_CONTROL_STATE m_eApplyButtonState; // enabled/disabled
  54. int m_nSortColumnIndex; // sort by name (0) or by status (1)
  55. BOOL m_bAscendDrvNameSort; // sort ascendent by name
  56. BOOL m_bAscendDrvStatusSort; // sort ascendent by status
  57. UINT_PTR m_uTimerHandler; // timer handler, returned by SetTimer()
  58. BOOL m_bTimerBlocked; // the automatic refresh is disabled during changes to the drivers list
  59. // Overrides
  60. // ClassWizard generate virtual function overrides
  61. //{{AFX_VIRTUAL(CVolatileSettPage)
  62. public:
  63. virtual BOOL OnQueryCancel();
  64. virtual BOOL OnApply();
  65. protected:
  66. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  67. //}}AFX_VIRTUAL
  68. // Implementation
  69. protected:
  70. // Generated message map functions
  71. //{{AFX_MSG(CVolatileSettPage)
  72. virtual BOOL OnInitDialog();
  73. afx_msg void OnCrtstatRefreshButton();
  74. afx_msg void OnColumnclickCrtstatDriversList(NMHDR* pNMHDR, LRESULT* pResult);
  75. afx_msg void OnTimer(UINT nIDEvent);
  76. afx_msg void OnCrtstatHspeedRadio();
  77. afx_msg void OnCrtstatLowRadio();
  78. afx_msg void OnCrtstatManualRadio();
  79. afx_msg void OnCrtstatNormRadio();
  80. afx_msg void OnApplyButton();
  81. afx_msg void OnCheck();
  82. afx_msg void OnAddButton();
  83. afx_msg void OnDontVerifyButton();
  84. afx_msg void OnRclickDriversList(NMHDR* pNMHDR, LRESULT* pResult);
  85. afx_msg LONG OnHelp( WPARAM wParam, LPARAM lParam );
  86. afx_msg LONG OnContextMenu( WPARAM wParam, LPARAM lParam );
  87. //}}AFX_MSG
  88. DECLARE_MESSAGE_MAP()
  89. protected:
  90. // operations
  91. void SetupListHeader();
  92. void FillTheList();
  93. void UpdateStatusColumn( int nItemIndex, ULONG uCrtDriver );
  94. void SortTheList();
  95. static int CALLBACK DrvStatusCmpFunc(
  96. LPARAM lParam1,
  97. LPARAM lParam2,
  98. LPARAM lParamSort);
  99. static int CALLBACK DrvNameCmpFunc(
  100. LPARAM lParam1,
  101. LPARAM lParam2,
  102. LPARAM lParamSort);
  103. void OnRefreshTimerChanged();
  104. void GetDlgDataFromSett();
  105. BOOL ApplyTheChanges();
  106. void UpdateControlsState();
  107. void EnableControl( CWnd &wndCtrl, VRF_CONTROL_STATE eNewState );
  108. };
  109. //{{AFX_INSERT_LOCATION}}
  110. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  111. #endif // !defined(AFX_VSETPAGE_H__5F8AD0D0_A5CA_11D2_98C6_00A0C9A26FFC__INCLUDED_)