HColorBar.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #if !defined(AFX_HCOLORBAR_H__25DEB863_33D8_44CA_89E9_779A6012C9A0__INCLUDED_)
  2. #define AFX_HCOLORBAR_H__25DEB863_33D8_44CA_89E9_779A6012C9A0__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // HColorBar.h : header file
  7. //
  8. #include "MainFrm.h"
  9. /////////////////////////////////////////////////////////////////////////////
  10. // HColorBar window
  11. #define COLORNUMBER 28
  12. class HColorBar : public CToolBar
  13. {
  14. // Construction
  15. public:
  16. HColorBar();
  17. virtual ~HColorBar();
  18. // Attributes
  19. public:
  20. // Operations
  21. public:
  22. // Overrides
  23. // ClassWizard generated virtual function overrides
  24. //{{AFX_VIRTUAL(CColorBar)
  25. //}}AFX_VIRTUAL
  26. // Implementation
  27. public:
  28. void UpdateDocument();
  29. COLORREF GetColor();//get method
  30. private:
  31. COLORREF m_COLOR[COLORNUMBER]; //colors of platte
  32. COLORREF m_currentColor; //current color
  33. CRect m_rect[COLORNUMBER]; //rect of platte
  34. CRect m_rectAll; //total area of rect
  35. // Generated message map functions
  36. protected:
  37. //{{AFX_MSG(HColorBar)
  38. afx_msg void OnPaint();
  39. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  40. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  41. //}}AFX_MSG
  42. DECLARE_MESSAGE_MAP()
  43. };
  44. /////////////////////////////////////////////////////////////////////////////
  45. //{{AFX_INSERT_LOCATION}}
  46. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  47. #endif // !defined(AFX_HCOLORBAR_H__25DEB863_33D8_44CA_89E9_779A6012C9A0__INCLUDED_)