ColorSelect.h
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:2k
源码类别:
绘图程序
开发平台:
Visual C++
- #if !defined XGL_GRAPGSOFT_COLOR_SELECT_HEADER_FILE_2004_3_20
- #define XGL_GRAPGSOFT_COLOR_SELECT_HEADER_FILE_2004_3_20
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CColorSelect : public CButton
- {
- // Construction
- public:
- CColorSelect();
- virtual ~CColorSelect();
- // Operations
- public:
- void SetColor(COLORREF ref);
- COLORREF GetColor();
- void GetColor(CString& strColor);
- void SetFillRect(CRect rect);
- void SetFillRect(int left,int top,int right,int bottom);
- CRect GetFillRect();
- void SetSelRect(CRect rect);
- void SetSelRect(int left,int top,int right,int bottom);
- CRect GetSelRect();
- // CPoint m_OldPos;
- //CPoint m_CurrentPos;
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CColorSelect)
- protected:
- virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
- //}}AFX_VIRTUAL
- // Implementation
- private:
- void DestroyPaletteWindow();
- BOOL CreatePaletteWindow();
- static LONG FAR PASCAL PaletteWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
- // Generated message map functions
- protected:
- //{{AFX_MSG(CColorSelect)
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
- afx_msg void OnPaint();
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnMouseHover(WPARAM wParam, LPARAM lParam);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- // Attributes
- protected:
- CRect m_rectFill,m_rectSel;
- private:
- COLORREF m_CurrentColor;
- HWND m_hPaletteWnd;
- BOOL m_bPaletteWndActive;
- HCURSOR m_hCursorStraw;
- };
- /////////////////////////////////////////////////////////////////////////////
- #endif // #if !defined XGL_GRAPGSOFT_COLOR_SELECT_HEADER_FILE_2004_3_20