#if !defined(__CPropITEMCOLOR_H__) #define __CPropITEMCOLOR_H__ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // PropTreeItemColor.h : header file // // Copyright (C) 1998-2001 Scott Ramsay // sramsay@gonavi.com // http://www.gonavi.com // // This material is provided "as is", with absolutely no warranty expressed // or implied. Any use is at your own risk. // // Permission to use or copy this software for any purpose is hereby granted // without fee, provided the above notices are retained on all copies. // Permission to modify the code and to distribute modified code is granted, // provided the above notices are retained, and a notice that the code was // modified is included with the above copyright notice. // // If you use this code, drop me an email. I'd like to know if you find the code // useful. #include "PropItem.h" class THVAC_UIAPI CPropItemColor : public CWnd, public CPropItem { public: CPropItemColor(); virtual ~CPropItemColor(); public: // The attribute area needs drawing virtual void DrawAttribute(CDC* pDC, const RECT& rc); // Retrieve the item's attribute value virtual LPARAM GetItemValue(); // Set the item's attribute value virtual void SetItemValue(COLORREF lParam); // Called when attribute area has changed size virtual void OnMove(); // Called when the item needs to refresh its data virtual void OnRefresh(); // Called when the item needs to commit its changes virtual void OnCommit(); // Called to activate the item virtual void OnActivate(); static void SetDefaultColorsList(COLORREF* pColors); protected: COLORREF m_cColor; COLORREF m_cPrevColor; CRect m_rcButton; LONG m_nSpot; BOOL m_bButton; BOOL m_bInDialog; static COLORREF* s_pColors; //{{AFX_VIRTUAL(CPropItemColor) //}}AFX_VIRTUAL protected: //{{AFX_MSG(CPropItemColor) afx_msg void OnKillFocus(CWnd* pNewWnd); afx_msg void OnPaint(); afx_msg void OnClose(); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); afx_msg void OnLButtonDown(UINT nFlags, CPoint point); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} #endif // !defined(__CPropITEMCOLOR_H__)