1 #if !defined(AFX_PROPTREEITEMCOLOR_H__50C09AC0_1F02_4150_AA6A_5151345D87A2__INCLUDED_)
2 #define AFX_PROPTREEITEMCOLOR_H__50C09AC0_1F02_4150_AA6A_5151345D87A2__INCLUDED_
6 #endif // _MSC_VER > 1000
7 // PropTreeItemColor.h : header file
9 // Copyright (C) 1998-2001 Scott Ramsay
11 // http://www.gonavi.com
13 // This material is provided "as is", with absolutely no warranty expressed
14 // or implied. Any use is at your own risk.
16 // Permission to use or copy this software for any purpose is hereby granted
17 // without fee, provided the above notices are retained on all copies.
18 // Permission to modify the code and to distribute modified code is granted,
19 // provided the above notices are retained, and a notice that the code was
20 // modified is included with the above copyright notice.
22 // If you use this code, drop me an email. I'd like to know if you find the code
25 #include "PropTreeItem.h"
27 /////////////////////////////////////////////////////////////////////////////
28 // CPropTreeItemColor window
30 class PROPTREE_API CPropTreeItemColor : public CWnd, public CPropTreeItem
35 virtual ~CPropTreeItemColor();
39 // The attribute area needs drawing
40 virtual void DrawAttribute(CDC* pDC, const RECT& rc);
42 // Retrieve the item's attribute value
43 virtual LPARAM GetItemValue();
45 // Set the item's attribute value
46 virtual void SetItemValue(LPARAM lParam);
48 // Called when attribute area has changed size
49 virtual void OnMove();
51 // Called when the item needs to refresh its data
52 virtual void OnRefresh();
54 // Called when the item needs to commit its changes
55 virtual void OnCommit();
57 // Called to activate the item
58 virtual void OnActivate(int activateType, CPoint point);
60 static void SetDefaultColorsList(COLORREF* pColors);
64 COLORREF m_cPrevColor;
70 static COLORREF* s_pColors;
73 // ClassWizard generated virtual function overrides
74 //{{AFX_VIRTUAL(CPropTreeItemColor)
80 // Generated message map functions
82 //{{AFX_MSG(CPropTreeItemColor)
83 afx_msg void OnKillFocus(CWnd* pNewWnd);
84 afx_msg void OnPaint();
85 afx_msg void OnClose();
86 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
87 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
88 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
93 /////////////////////////////////////////////////////////////////////////////
95 //{{AFX_INSERT_LOCATION}}
96 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
98 #endif // !defined(AFX_PROPTREEITEMCOLOR_H__50C09AC0_1F02_4150_AA6A_5151345D87A2__INCLUDED_)