20 #include "../../../idlib/precompiled.h"
29 static char THIS_FILE[] = __FILE__;
37 m_nFormat(ValueFormatText),
52 ON_CONTROL_REFLECT(EN_KILLFOCUS, OnKillfocus)
61 ASSERT(m_pProp!=
NULL);
63 pDC->SelectObject(IsReadOnly() ? m_pProp->GetNormalFont() : m_pProp->GetBoldFont());
64 pDC->SetTextColor(RGB(0,0,0));
65 pDC->SetBkMode(TRANSPARENT);
72 ch = (m_bPassword) ?
'*' :
'\0';
79 for (
LONG i=0;
i<s.GetLength();
i++)
82 pDC->DrawText(s, r, DT_SINGLELINE|DT_VCENTER);
86 pDC->DrawText(m_sEdit, r, DT_SINGLELINE|DT_VCENTER);
125 m_sEdit.Format(_T(
"%d"), lParam);
140 TRACE0(
"CPropTreeItemEdit::SetItemValue - Invalid lParam value\n");
150 if (IsWindow(m_hWnd))
151 SetWindowPos(
NULL,
m_rc.left,
m_rc.top,
m_rc.Width(),
m_rc.Height(), SWP_NOZORDER|SWP_NOACTIVATE);
157 if (IsWindow(m_hWnd))
175 if (!IsWindow(m_hWnd))
179 dwStyle = WS_CHILD|ES_AUTOHSCROLL;
189 SetWindowPos(
NULL,
m_rc.left,
m_rc.top,
m_rc.Width(),
m_rc.Height(), SWP_NOZORDER|SWP_SHOWWINDOW);
196 return CEdit::OnGetDlgCode()|DLGC_WANTALLKEYS;
202 if (nChar==VK_RETURN)
205 CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
static CFont * GetNormalFont()
CONST PIXELFORMATDESCRIPTOR UINT
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
virtual LPARAM GetItemValue()
void SetValueFormat(ValueFormat nFormat)
virtual void SetItemValue(LPARAM lParam)
afx_msg void OnKillfocus()
GLdouble GLdouble GLdouble r
virtual ~CPropTreeItemEdit()
afx_msg UINT OnGetDlgCode()
void SetAsPassword(BOOL bPassword)
virtual void OnActivate(int activateType, CPoint point)