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.

93 lines
2.3 KiB

  1. // devgenpg.h : header file
  2. //
  3. #ifndef __DEVGENPG_H__
  4. #define __DEVGENPG_H__
  5. /*++
  6. Copyright (C) 1997-1999 Microsoft Corporation
  7. Module Name:
  8. devgenpg.h
  9. Abstract:
  10. header file for devgenpg.cpp
  11. Author:
  12. William Hsieh (williamh) created
  13. Revision History:
  14. --*/
  15. #include "proppage.h"
  16. //#include "tshooter.h"
  17. //
  18. // help topic ids
  19. //
  20. #define IDH_DISABLEHELP (DWORD(-1))
  21. #define idh_devmgr_general_devicetype 103100 // General: "" (Static)
  22. #define idh_devmgr_general_manufacturer 103110 // General: "" (Static)
  23. #define idh_devmgr_general_hardware_revision 103120 // General: "Not Available" (Static)
  24. #define idh_devmgr_general_device_status 103130 // General: "" (Static)
  25. #define idh_devmgr_general_device_usage 103140 // General: "List1" (SysListView32)
  26. #define idh_devmgr_general_location 103160
  27. #define idh_devmgr_general_trouble 103150 // troubelshooting button
  28. class CHwProfileList;
  29. class CProblemAgent;
  30. const int LVIS_GCNOCHECK = INDEXTOSTATEIMAGEMASK(1);
  31. const int LVIS_GCCHECK = INDEXTOSTATEIMAGEMASK(2);
  32. extern const int CMProblemNumberToStringID[];
  33. #define DI_NEEDPOWERCYCLE 0x400000L
  34. #define DEVICE_ENABLE 0
  35. #define DEVICE_DISABLE 1
  36. #define DEVICE_DISABLE_GLOBAL 2
  37. class CDeviceGeneralPage : public CPropSheetPage
  38. {
  39. public:
  40. CDeviceGeneralPage() :
  41. m_pDevice(NULL),
  42. m_pHwProfileList(NULL),
  43. m_RestartFlags(0),
  44. m_pProblemAgent(NULL),
  45. m_hwndLocationTip(NULL),
  46. CPropSheetPage(g_hInstance, IDD_DEVGEN_PAGE)
  47. {}
  48. ~CDeviceGeneralPage();
  49. HPROPSHEETPAGE Create(CDevice* pDevice);
  50. virtual BOOL OnInitDialog(LPPROPSHEETPAGE ppsp);
  51. virtual BOOL OnApply(void);
  52. virtual BOOL OnLastChanceApply(void);
  53. virtual BOOL OnQuerySiblings(WPARAM wParam, LPARAM lParam);
  54. virtual void UpdateControls(LPARAM lParam = 0);
  55. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  56. virtual BOOL OnHelp(LPHELPINFO pHelpInfo);
  57. virtual BOOL OnContextMenu(HWND hWnd, WORD xPos, WORD yPos);
  58. virtual UINT DestroyCallback();
  59. private:
  60. void UpdateHwProfileStates();
  61. CHwProfileList* m_pHwProfileList;
  62. DWORD m_hwpfCur;
  63. CDevice* m_pDevice;
  64. int m_CurrentDeviceUsage;
  65. int m_SelectedDeviceUsage;
  66. DWORD m_RestartFlags;
  67. CProblemAgent* m_pProblemAgent;
  68. HWND m_hwndLocationTip;
  69. };
  70. #endif // __DEVGENPG_H__