20 #include "../../../idlib/precompiled.h"
29 static char THIS_FILE[] = __FILE__;
32 #define BUTTON_SIZE 17
39 m_nFormat(ValueFormatText),
55 ON_CONTROL_REFLECT(EN_KILLFOCUS, OnKillfocus)
70 textSize = pDC->GetOutputTextExtent( buttonText );
72 buttonRect.left = m_rc.right - ( textSize.cx + 12 + 4);
73 buttonRect.top = m_rc.top + ((m_rc.bottom - m_rc.top)/2)-
BUTTON_SIZE/2;
74 buttonRect.right = buttonRect.left + textSize.cx + 12;
79 if ( (m_dwState & TreeItemChecked) ) {
80 buttonStyle = DFCS_BUTTONPUSH | DFCS_PUSHED;
82 buttonStyle = DFCS_BUTTONPUSH;
84 pDC->DrawFrameControl(&buttonRect, DFC_BUTTON, buttonStyle );
86 textRect = buttonRect;
89 pDC->DrawText( buttonText, textRect, DT_SINGLELINE|DT_VCENTER );
92 hitTestRect = buttonRect;
93 hitTestRect.OffsetRect(0, m_pProp->GetOrigin().y);
103 pDC->SetTextColor(RGB(0,0,0));
104 pDC->SetBkMode(TRANSPARENT);
119 for (
LONG i=0;
i<s.GetLength();
i++)
122 pDC->DrawText(s, r, DT_SINGLELINE|DT_VCENTER);
126 pDC->DrawText(
m_sEdit, r, DT_SINGLELINE|DT_VCENTER);
165 m_sEdit.Format(_T(
"%d"), lParam);
180 TRACE0(
"CPropTreeItemEditButton::SetItemValue - Invalid lParam value\n");
190 if (IsWindow(m_hWnd))
191 SetWindowPos(
NULL,
m_rc.left,
m_rc.top,
m_rc.Width(),
m_rc.Height(), SWP_NOZORDER|SWP_NOACTIVATE);
197 if (IsWindow(m_hWnd))
215 if (!IsWindow(m_hWnd))
219 dwStyle = WS_CHILD|ES_AUTOHSCROLL;
235 return CEdit::OnGetDlgCode()|DLGC_WANTALLKEYS;
241 if (nChar==VK_RETURN)
244 CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
static CFont * GetNormalFont()
CONST PIXELFORMATDESCRIPTOR UINT
virtual LONG DrawItem(CDC *pDC, const RECT &rc, LONG x, LONG y)
static CFont * GetBoldFont()
GLdouble GLdouble GLdouble r