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.

89 lines
3.2 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1993-1995
  4. * TITLE: USBAPP.H
  5. * VERSION: 1.0
  6. * AUTHOR: jsenior
  7. * DATE: 10/28/1998
  8. *
  9. ********************************************************************************
  10. *
  11. * CHANGE LOG:
  12. *
  13. * DATE REV DESCRIPTION
  14. * ---------- ------- ----------------------------------------------------------
  15. * 10/28/1998 jsenior Original implementation.
  16. *
  17. *******************************************************************************/
  18. #include "usbitem.h"
  19. #include <windowsx.h>
  20. #include "proppage.h"
  21. extern HINSTANCE gHInst;
  22. class UsbApplet
  23. {
  24. public:
  25. UsbApplet() : hMainWnd(0), hTreeDevices(0), barLocation(0),
  26. bButtonDown(FALSE) {propPage=NULL;}
  27. //: bandpage(0), powrpage(0) {;}
  28. ~UsbApplet() {;}
  29. BOOL CustomDialog();
  30. static BOOL IsValid(UsbItem *Item);
  31. static BOOL IsBold(UsbItem *Item);
  32. static BOOL IsExpanded(UsbItem *Item);
  33. VOID OnClose (HWND hWnd);
  34. protected:
  35. static USBINT_PTR APIENTRY StaticDialogProc(IN HWND hDlg,
  36. IN UINT uMessage,
  37. IN WPARAM wParam,
  38. IN LPARAM lParam);
  39. static UINT CALLBACK StaticDialogCallback(HWND Hwnd,
  40. UINT Msg,
  41. LPPROPSHEETPAGE Page);
  42. USBINT_PTR APIENTRY ActualDialogProc(IN HWND hDlg,
  43. IN UINT uMessage,
  44. IN WPARAM wParam,
  45. IN LPARAM lParam)
  46. { return FALSE; } // DefDlgProc(hDlg, uMessage, wParam, lParam); }
  47. BOOL OnCommand(INT wNotifyCode, INT wID, HWND hCtl);
  48. BOOL OnInitDialog(HWND HWnd);
  49. BOOL Refresh();
  50. BOOL OnContextMenu(HWND HwndControl, WORD Xpos, WORD Ypos);
  51. void OnHelp(HWND ParentHwnd, LPHELPINFO HelpInfo);
  52. VOID OnSize (HWND hWnd, UINT state, int cx, int cy);
  53. VOID OnMouseMove (HWND hWnd, int x, int y, UINT keyFlags);
  54. VOID OnLButtonDown (HWND hWnd, BOOL fDoubleClick, int x, int y, UINT keyFlags);
  55. VOID OnLButtonUp (HWND hWnd, int x, int y, UINT keyFlags);
  56. LRESULT OnNotify (HWND hWnd, int DlgItem, LPNMHDR lpNMHdr);
  57. // BOOL OnDeviceChange (HWND hwnd, UINT uEvent, DWORD dwEventData);
  58. LRESULT OnDeviceChange(HWND hWnd, UINT wParam, DWORD lParam);
  59. BOOL RegisterForDeviceNotification(HWND hWnd);
  60. VOID UpdateEditControl(UsbItem *usbItem);
  61. VOID ResizeWindows (HWND hWnd, BOOL bSizeBar, int BarLocation);
  62. HTREEITEM InsertRoot(LPTV_INSERTSTRUCT item, UsbItem *firstController);
  63. // BandwidthPage *bandPage;
  64. // PowerPage *powerPage;
  65. UsbPropertyPage *propPage;
  66. HWND hMainWnd;
  67. HWND hTreeDevices;
  68. HWND hEditControl;
  69. HCURSOR hSplitCursor;
  70. BOOL bButtonDown;
  71. int barLocation;
  72. HDEVNOTIFY hDevNotify;
  73. UsbImageList ImageList;
  74. UsbItem *rootItem;
  75. };