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.

107 lines
2.8 KiB

  1. #ifndef __IMGCOLOR_H__
  2. #define __IMGCOLOR_H__
  3. /******************************************************************************/
  4. class CImgWnd;
  5. #ifdef CUSTOMFLOAT
  6. class CDocking;
  7. #endif
  8. /******************************************************************************/
  9. class CImgColorsWnd : public CControlBar
  10. {
  11. public:
  12. CImgColorsWnd();
  13. enum HitZone
  14. {
  15. none = -2,
  16. curColor = -1,
  17. firstColor = 0
  18. };
  19. int m_nDisplayColorsInitial;
  20. int m_nDisplayColors;
  21. int m_nOffsetY;
  22. int m_nCols;
  23. int m_nRows;
  24. #ifdef CUSTOMFLOAT
  25. CDocking* m_pDocking;
  26. #endif
  27. CRect m_rectColors;
  28. BOOL Create( const TCHAR* pWindowName, DWORD dwStyle, CWnd* pParentWnd );
  29. void InvalidateCurColors();
  30. WORD GetHelpOffset();
  31. HitZone HitTest(const CPoint& point);
  32. BOOL GetHitRect(HitZone hitZone, CRect& rect);
  33. void PaintCurColorBox(CDC* pDC, BOOL bRight);
  34. void PaintCurColors(CDC* pDC, const CRect* pPaintRect);
  35. void PaintColors(CDC* pDC, const CRect* pPaintRect);
  36. void CancelDrag();
  37. virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
  38. virtual void OnUpdateCmdUI( CFrameWnd* pTarget, BOOL bDisableIfNoHndler );
  39. #ifdef _DEBUG
  40. virtual void AssertValid() const
  41. {
  42. CWnd::AssertValid();
  43. }
  44. #endif //_DEBUG
  45. //{{AFX_MSG(CImgColorsWnd)
  46. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  47. afx_msg void OnPaint();
  48. afx_msg void OnClose();
  49. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  50. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  51. afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
  52. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  53. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  54. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  55. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  56. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. };
  60. /******************************************************************************/
  61. #ifdef CUSTOMFLOAT
  62. class CFloatImgColorsWnd : public CMiniFrmWnd
  63. {
  64. DECLARE_DYNAMIC(CFloatImgColorsWnd)
  65. public:
  66. virtual ~CFloatImgColorsWnd(void);
  67. virtual BOOL Create(const TCHAR* pWindowName, DWORD dwStyle,
  68. const RECT& rect, CWnd* pParentWnd);
  69. virtual WORD GetHelpOffset() { return ID_WND_GRAPHIC; }
  70. afx_msg void OnClose();
  71. DECLARE_MESSAGE_MAP()
  72. };
  73. #endif
  74. extern void InvalColorCache();
  75. extern CImgColorsWnd* NEAR g_pImgColorsWnd;
  76. /***************************************************************************/
  77. #endif // __IMGCOLOR_H__