Solved

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

Posted on 2001-06-12
6
360 Views
Last Modified: 2013-11-20
How to insert a text in the Edit box of a ComboBox without adding the text to the combo list?
0
Comment
Question by:KeithTeo
6 Comments
 

Expert Comment

by:kobib
ID: 6184747
Hi KeithTeo,

Try to use YourComboObject.AddString (String);

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

0
 

Expert Comment

by:mickeer
ID: 6184762
Hi!

I would suggest that you use:

  ComboObject.SetWindowText("your string");

/Micke
0
 

Author Comment

by:KeithTeo
ID: 6189181
I do not want to add to the combo list (as stated in question).
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Expert Comment

by:kobib
ID: 6191053
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
 

Accepted Solution

by:
geo_134 earned 50 total points
ID: 6229570
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
 

Expert Comment

by:ocbb
ID: 6318232
As Micke stated, use ComboObject.SetWindowText("your string");

Errol
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question