I am creating a CExtComboBox dynamically:
CExtComboBox* pCombo = new CExtComboBox();
pCombo->m_bEnableAutoComplete = false;
pCombo->m_bEnableAutoFilter = true;
CRect Rect (110, 50, 300, 200);
DWORD uStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWN | CBS_SORT; //CBS_AUTOHSCROLL;
pCombo->Create( uStyle, Rect, this, 12);
pCombo->ModifyStyleEx(0, WS_EX_NOPARENTNOTIFY);
pCombo->SetFont( CFont::FromHandle( (HFONT)::GetStockObject(DEFAULT_GUI_FONT) ) );
I am unable to make the filter popup list appear while typing. I compared my dynamically created control versus one created via resource. The resource one works just fine. I debugged the dynamic combo box and found out that in the method
CExtComboBoxBase::OnSubclassInnerEdit()
...
HWND hWnd = ::GetWindow( m_hWnd, GW_CHILD );
...
The hWnd is NULL which prevents m_wndInnerEditHook from being subclassed. Which than later in
CExtComboBoxBase::OnEditCtrlUpdate()
the inner edit control is NULL and the filterlist is not shown.
Is there anything I need to add to my dynamic creation to make this work?