1 #ifndef __PROP_TREE_ITEM_EDIT_BUTTON_H__
2 #define __PROP_TREE_ITEM_EDIT_BUTTON_H__
7 #endif // _MSC_VER > 1000
8 // PropTreeItemEdit.h : header file
10 // Copyright (C) 1998-2001 Scott Ramsay
12 // http://www.gonavi.com
14 // This material is provided "as is", with absolutely no warranty expressed
15 // or implied. Any use is at your own risk.
17 // Permission to use or copy this software for any purpose is hereby granted
18 // without fee, provided the above notices are retained on all copies.
19 // Permission to modify the code and to distribute modified code is granted,
20 // provided the above notices are retained, and a notice that the code was
21 // modified is included with the above copyright notice.
23 // If you use this code, drop me an email. I'd like to know if you find the code
26 #include "PropTreeItem.h"
27 //#include "PropTreeItemEdit.h"
29 /////////////////////////////////////////////////////////////////////////////
30 // CPropTreeItemEditButton window
32 class PROPTREE_API CPropTreeItemEditButton : public CPropTreeItemEdit
36 CPropTreeItemEditButton();
37 virtual ~CPropTreeItemEditButton();
41 // The non-attribute area needs drawing
42 virtual LONG DrawItem(CDC* pDC, const RECT& rc, LONG x, LONG y);
44 // The attribute area needs drawing
45 virtual void DrawAttribute(CDC* pDC, const RECT& rc);
47 // Retrieve the item's attribute value
48 virtual LPARAM GetItemValue();
50 // Set the item's attribute value
51 virtual void SetItemValue(LPARAM lParam);
53 // Called when attribute area has changed size
54 virtual void OnMove();
56 // Called when the item needs to refresh its data
57 virtual void OnRefresh();
59 // Called when the item needs to commit its changes
60 virtual void OnCommit();
62 // Called to activate the item
63 virtual void OnActivate(int activateType, CPoint point);
70 ValueFormatFloatPointer
73 // Set to specifify format of SetItemValue/GetItemValue
74 void SetValueFormat(ValueFormat nFormat);
76 // Set to TRUE for to use a password edit control
77 void SetAsPassword(BOOL bPassword);
79 // Overrideable - Returns TRUE if the point is on the button
80 virtual BOOL HitButton(const POINT& pt);
82 void SetButtonText( LPCSTR text );
88 ValueFormat m_nFormat;
102 // ClassWizard generated virtual function overrides
103 //{{AFX_VIRTUAL(CPropTreeItemEditButton)
109 // Generated message map functions
111 //{{AFX_MSG(CPropTreeItemEditButton)
112 afx_msg UINT OnGetDlgCode();
113 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
114 afx_msg void OnKillfocus();
117 DECLARE_MESSAGE_MAP()
120 /////////////////////////////////////////////////////////////////////////////
122 //{{AFX_INSERT_LOCATION}}
123 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
125 #endif // __PROP_TREE_ITEM_EDIT_BUTTON_H__