doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PropTreeItemStatic.cpp
Go to the documentation of this file.
1 // PropTreeItemStatic.cpp
2 //
3 // Copyright (C) 1998-2001 Scott Ramsay
4 // sramsay@gonavi.com
5 // http://www.gonavi.com
6 //
7 // This material is provided "as is", with absolutely no warranty expressed
8 // or implied. Any use is at your own risk.
9 //
10 // Permission to use or copy this software for any purpose is hereby granted
11 // without fee, provided the above notices are retained on all copies.
12 // Permission to modify the code and to distribute modified code is granted,
13 // provided the above notices are retained, and a notice that the code was
14 // modified is included with the above copyright notice.
15 //
16 // If you use this code, drop me an email. I'd like to know if you find the code
17 // useful.
18 
19 //#include "stdafx.h"
20 #include "../../../idlib/precompiled.h"
21 #pragma hdrstop
22 
23 #include "PropTree.h"
24 
25 #include "PropTreeItemStatic.h"
26 
27 
29  m_sAttribute(_T(""))
30 {
31 }
32 
33 
35 {
36 }
37 
38 
39 void CPropTreeItemStatic::DrawAttribute(CDC* pDC, const RECT& rc)
40 {
41  ASSERT(m_pProp!=NULL);
42 
43  pDC->SelectObject(m_pProp->GetNormalFont());
44  pDC->SetTextColor(RGB(0,0,0));
45  pDC->SetBkMode(TRANSPARENT);
46 
47  CRect r = rc;
48  pDC->DrawText(m_sAttribute, r, DT_SINGLELINE|DT_VCENTER);
49 }
50 
51 
53 {
54  return (LPARAM)(LPCTSTR)m_sAttribute;
55 }
56 
57 
59 {
60  if (lParam==0L)
61  {
62  TRACE0("CPropTreeItemStatic::SetItemValue() - Invalid lParam value\n");
63  return;
64  }
65 
66  m_sAttribute = (LPCTSTR)lParam;
67 }
static CFont * GetNormalFont()
Definition: PropTree.cpp:272
virtual void DrawAttribute(CDC *pDC, const RECT &rc)
#define NULL
Definition: Lib.h:88
CPropTree * m_pProp
Definition: PropTreeItem.h:147
Definition: eax4.h:1413
virtual LPARAM GetItemValue()
GLdouble GLdouble GLdouble r
Definition: glext.h:2951
virtual void SetItemValue(LPARAM lParam)