20 #include "../../../idlib/precompiled.h"
24 #include "../../../sys/win32/rc/proptree_Resource.h"
31 static char THIS_FILE[] = __FILE__;
34 #define DROPDOWN_HEIGHT 100
52 ON_CONTROL_REFLECT(CBN_SELCHANGE, OnSelchange)
53 ON_CONTROL_REFLECT(CBN_KILLFOCUS, OnKillfocus)
62 ASSERT(m_pProp!=
NULL);
65 if (!IsWindow(m_hWnd))
67 TRACE0(
"CPropTreeItemCombo::DrawAttribute() - The window has not been created\n");
71 pDC->SelectObject(IsReadOnly() ? m_pProp->GetNormalFont() : m_pProp->GetBoldFont());
72 pDC->SetTextColor(RGB(0,0,0));
73 pDC->SetBkMode(TRANSPARENT);
79 if ((idx = GetCurSel())!=CB_ERR)
84 pDC->DrawText(s, r, DT_SINGLELINE|DT_VCENTER);
103 if (IsWindow(m_hWnd) && IsWindowVisible())
104 SetWindowPos(
NULL,
m_rc.left,
m_rc.top,
m_rc.Width() + 1,
m_rc.Height(), SWP_NOZORDER|SWP_SHOWWINDOW);
122 if ((idx = GetCurSel())==CB_ERR)
146 if (IsWindow(m_hWnd))
150 dwStyle = (WS_CHILD|WS_VSCROLL|dwStyle) & ~WS_VISIBLE;
154 TRACE0(
"CPropTreeItemCombo::CreateComboBox() - failed to create combo box\n");
168 if (IsWindow(m_hWnd))
172 DWORD dwStyle = WS_CHILD|WS_VSCROLL|CBS_SORT|CBS_DROPDOWNLIST;
176 TRACE0(
"CPropTreeItemCombo::CreateComboBoxBool() - failed to create combo box\n");
188 SetItemData(idx,
TRUE);
192 SetItemData(idx,
FALSE);
202 for (idx = 0; idx < GetCount(); idx++)
204 if (GetItemData(idx)==(
DWORD)lParam)
afx_msg void OnSelchange()
static CFont * GetNormalFont()
virtual void SetItemValue(LPARAM lParam)
virtual ~CPropTreeItemCombo()
virtual void OnActivate(int activateType, CPoint point)
afx_msg void OnKillfocus()
void SetDropDownHeight(LONG nDropHeight)
BOOL CreateComboBox(DWORD dwStyle=WS_CHILD|WS_VSCROLL|CBS_SORT|CBS_DROPDOWNLIST)
BOOL CreateComboBoxBool()
GLdouble GLdouble GLdouble r
LONG FindCBData(LPARAM lParam)
virtual LPARAM GetItemValue()