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.

84 lines
2.0 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. hatchwnd.h
  5. Abstract:
  6. Header file for the CHatchWin class. CHatchWin when used
  7. as a parent window creates a thin hatch border around
  8. the child window.
  9. --*/
  10. #ifndef _HATCHWND_H_
  11. #define _HATCHWND_H_
  12. //Window extra bytes and offsets
  13. #define CBHATCHWNDEXTRA (sizeof(LONG_PTR))
  14. #define HWWL_STRUCTURE 0
  15. //Notification codes for WM_COMMAND messages
  16. #define HWN_BORDERDOUBLECLICKED 1
  17. #define HWN_RESIZEREQUESTED 2
  18. // Drag modes
  19. #define DRAG_IDLE 0
  20. #define DRAG_PENDING 1
  21. #define DRAG_ACTIVE 2
  22. class CHatchWin
  23. {
  24. friend LRESULT APIENTRY HatchWndProc(HWND, UINT, WPARAM, LPARAM);
  25. protected:
  26. HWND m_hWnd;
  27. HWND m_hWndParent; //Parent's window
  28. UINT m_uDragMode;
  29. UINT m_uHdlCode;
  30. RECT m_rectNew;
  31. POINT m_ptDown;
  32. POINT m_ptHatchOrg;
  33. HRGN m_hRgnDrag;
  34. BOOLEAN m_bResizeInProgress;
  35. private:
  36. void OnMouseMove(INT x, INT y);
  37. void OnLeftDown(INT x, INT y);
  38. void OnLeftUp(void);
  39. void StartTracking(void);
  40. void OnTimer(void);
  41. void OnPaint(void);
  42. public:
  43. INT m_iBorder;
  44. UINT m_uID;
  45. HWND m_hWndKid;
  46. HWND m_hWndAssociate;
  47. RECT m_rcPos;
  48. RECT m_rcClip;
  49. public:
  50. CHatchWin(void);
  51. ~CHatchWin(void);
  52. BOOL Init(HWND, UINT, HWND);
  53. HWND Window(void);
  54. HWND HwndAssociateSet(HWND);
  55. HWND HwndAssociateGet(void);
  56. void RectsSet(LPRECT, LPRECT);
  57. void ChildSet(HWND);
  58. void ShowHatch(BOOL);
  59. };
  60. typedef CHatchWin *PCHatchWin;
  61. #endif //_HATCHWND_H_