3 // PropTreeItemCheck.h : header file
5 // Copyright (C) 1998-2001 Scott Ramsay
7 // http://www.gonavi.com
9 // This material is provided "as is", with absolutely no warranty expressed
10 // or implied. Any use is at your own risk.
12 // Permission to use or copy this software for any purpose is hereby granted
13 // without fee, provided the above notices are retained on all copies.
14 // Permission to modify the code and to distribute modified code is granted,
15 // provided the above notices are retained, and a notice that the code was
16 // modified is included with the above copyright notice.
18 // If you use this code, drop me an email. I'd like to know if you find the code
21 #include "PropTreeItem.h"
23 /////////////////////////////////////////////////////////////////////////////
24 // CPropTreeItemCheck window
26 class PROPTREE_API CPropTreeItemCheck : public CButton, public CPropTreeItem
31 virtual ~CPropTreeItemCheck();
35 // The attribute area needs drawing
36 virtual void DrawAttribute(CDC* pDC, const RECT& rc);
38 // Retrieve the item's attribute value
39 virtual LPARAM GetItemValue();
41 // Set the item's attribute value
42 virtual void SetItemValue(LPARAM lParam);
44 // Called when attribute area has changed size
45 virtual void OnMove();
47 // Called when the item needs to refresh its data
48 virtual void OnRefresh();
50 // Called when the item needs to commit its changes
51 virtual void OnCommit();
53 // Called to activate the item
54 virtual void OnActivate(int activateType, CPoint point);
56 bool HitCheckBoxTest(const POINT& pt);
58 bool CreateCheckBox();
60 BOOL GetCheckState() { return checkState; };
61 void SetCheckState(BOOL state);
72 // ClassWizard generated virtual function overrides
73 //{{AFX_VIRTUAL(CPropTreeItemCheck)
79 // Generated message map functions
81 //{{AFX_MSG(CPropTreeItemCheck)
88 afx_msg void OnBnKillfocus();
89 afx_msg void OnBnClicked();
92 /////////////////////////////////////////////////////////////////////////////
94 //{{AFX_INSERT_LOCATION}}
95 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.