• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

How to insert a text in the Edit box of a ComboBox?

How to insert a text in the Edit box of a ComboBox without adding the text to the combo list?
0
KeithTeo
Asked:
KeithTeo
1 Solution
 
kobibCommented:
Hi KeithTeo,

Try to use YourComboObject.AddString (String);

where the variables define as:
           CComboBox YourComboObject;
           char Srting[20] = "This is my string";

0
 
mickeerCommented:
Hi!

I would suggest that you use:

  ComboObject.SetWindowText("your string");

/Micke
0
 
KeithTeoAuthor Commented:
I do not want to add to the combo list (as stated in question).
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
kobibCommented:
So what do you want to do, can you make yourself more clear?

you said:

>>How to insert a text in the Edit box of a ComboBox
0
 
geo_134Commented:
hi,
 see the msdn article "HOWTO: Subclass CListBox and CEdit Inside of CComboBox".once you get the hwnd of the Cedit class you can just use SetWindowText to set the text.
0
 
ocbbCommented:
As Micke stated, use ComboObject.SetWindowText("your string");

Errol
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now