00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _RM_MFC_UTILITIES_COLOR_SLIDER_H_
00014 #define _RM_MFC_UTILITIES_COLOR_SLIDER_H_
00015
00016 #include <MFCUtilities/RmMFCTypes.h>
00017
00018 #define MAX_COLOR_SLIDER_COLORS 32
00019
00020
00021
00022
00023
00024
00025
00026
00027 class RMMFCUTIL_API CRmColorSlider: public CSliderCtrl
00028 {
00029 public:
00030
00031
00032 CRmColorSlider();
00033
00034
00035 virtual ~CRmColorSlider();
00036
00037 public:
00038
00039
00040
00041
00042
00043 protected:
00044
00045 void SetValueFromPoint( CPoint *pPoint );
00046
00047
00048 afx_msg void OnPaint();
00049 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00050 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00051 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00052 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00053 afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
00054 afx_msg LRESULT OnValueChanged( WPARAM wParam, LPARAM lParam );
00055 afx_msg void OnCaptureChanged(CWnd *pWnd);
00056
00057
00058 DECLARE_MESSAGE_MAP()
00059
00060 public:
00061
00062 float *m_pfValue;
00063 CPoint m_oldPoint;
00064
00065 float m_fColorArray[ MAX_COLOR_SLIDER_COLORS ][ 3 ];
00066 int m_nNumColors;
00067
00068 private:
00069
00070 bool m_bLButtonDown;
00071 int m_nChangeMessageIndex;
00072
00073 };
00074
00075 #endif // !defined( RMMFC_CCOLORSLIDER_DEFINE )