• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 407
  • 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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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