Re: The Edit Control of a Combo Box...
From: BRM (BRM_at_discussions.microsoft.com)
Date: Mon, 16 Aug 2004 10:01:02 -0700
"Jeff Partch [MVP]" wrote:
> "BRM" <BRM@discussions.microsoft.com> wrote in message
> > The MSDN documentation references a CComboBox::GetEditControl()
> > member, but VC++ 2003 neither brings it up in the quick reference drop
> > while typing nor recognizes it as either Cmb->GetEditControl() or
> > GetEditControl() (where Cmb is a pointer to a ComboBox control).
> I can't find documentation of this member function, and don't think it
> exists. Do you have a link or reference to it?
Sorry about that one. I was looking at the CListCtrl at the time and thought
I was looking at the CComboBox. My mistake there.
> > I have set the combo boxes to be read-only so that the user cannot type in
> > data. Otherwise, the controls are pretty standard.
> I'm not sure what a read-only combobox is. Do you mean a CBS_DROPDOWNLIST
> style combobox? If so, there is no edit control.
The properties in the dialog editor for the combo box is set to Drop List. I
think (but am not positive) that that is CBS_DROPDOWNLIST style.
I just need to set the text of the combo box when the drop down is not
present to be a certain string that is dependant on the user action; and for
the time being, I'd rather not have to deal with the user editing that text
> > I have also tried setting the window text, but that does not work either.
> > (Cmb->SetWindowText(msCStringwithtext);
> The documentation indicates that SetWindowText should work (if there is an
> edit control).