doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PropTreeItemCombo.h
Go to the documentation of this file.
1 #if !defined(AFX_PROPTREEITEMCOMBO_H__9916BC6F_751F_4B15_996F_3C9F6334A259__INCLUDED_)
2 #define AFX_PROPTREEITEMCOMBO_H__9916BC6F_751F_4B15_996F_3C9F6334A259__INCLUDED_
3 
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // PropTreeItemCombo.h : header file
8 //
9 // Copyright (C) 1998-2001 Scott Ramsay
10 // sramsay@gonavi.com
11 // http://www.gonavi.com
12 //
13 // This material is provided "as is", with absolutely no warranty expressed
14 // or implied. Any use is at your own risk.
15 //
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.
21 //
22 // If you use this code, drop me an email. I'd like to know if you find the code
23 // useful.
24 
25 #include "PropTreeItem.h"
26 
28 // CPropTreeItemCombo window
29 
30 class PROPTREE_API CPropTreeItemCombo : public CComboBox, public CPropTreeItem
31 {
32 // Construction
33 public:
35  virtual ~CPropTreeItemCombo();
36 
37 // Attributes
38 public:
39  // The attribute area needs drawing
40  virtual void DrawAttribute(CDC* pDC, const RECT& rc);
41 
42  // Retrieve the item's attribute value
43  virtual LPARAM GetItemValue();
44 
45  // Set the item's attribute value
46  virtual void SetItemValue(LPARAM lParam);
47 
48  // Called when attribute area has changed size
49  virtual void OnMove();
50 
51  // Called when the item needs to refresh its data
52  virtual void OnRefresh();
53 
54  // Called when the item needs to commit its changes
55  virtual void OnCommit();
56 
57  // Called to activate the item
58  virtual void OnActivate(int activateType, CPoint point);
59 
60  // Create your combo box with your specified styles
61  BOOL CreateComboBox(DWORD dwStyle = WS_CHILD|WS_VSCROLL|CBS_SORT|CBS_DROPDOWNLIST);
62 
63  // Create combo box with TRUE/FALSE selections
64  BOOL CreateComboBoxBool();
65 
66  // Set the height for the dropdown combo box
67  void SetDropDownHeight(LONG nDropHeight);
68 
69  // Get the height of the dropdown combo box
70  LONG GetDropDownHeight();
71 
72 protected:
75 
76 // Operations
77 protected:
78  LONG FindCBData(LPARAM lParam);
79 
80 // Overrides
81  // ClassWizard generated virtual function overrides
82  //{{AFX_VIRTUAL(CPropTreeItemCombo)
83  //}}AFX_VIRTUAL
84 
85 // Implementation
86 public:
87 
88  // Generated message map functions
89 protected:
90  //{{AFX_MSG(CPropTreeItemCombo)
91  afx_msg void OnSelchange();
92  afx_msg void OnKillfocus();
93  //}}AFX_MSG
94 
95  DECLARE_MESSAGE_MAP()
96 };
97 
99 
100 //{{AFX_INSERT_LOCATION}}
101 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
102 
103 #endif // !defined(AFX_PROPTREEITEMCOMBO_H__9916BC6F_751F_4B15_996F_3C9F6334A259__INCLUDED_)
virtual void DrawAttribute(CDC *pDC, const RECT &rc)
DWORD
Definition: win_qgl.cpp:61
#define PROPTREE_API
Definition: PropTree.h:53
virtual void OnRefresh()
virtual void OnCommit()
#define BOOL
Definition: mprintf.c:71
virtual LPARAM GetItemValue()
long LONG
virtual void SetItemValue(LPARAM lParam)
virtual void OnMove()
virtual void OnActivate(int activateType, CPoint point)