Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 2001-06-12
Medium Priority
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?
Question by:KeithTeo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6184747
Hi KeithTeo,

Try to use YourComboObject.AddString (String);

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


Expert Comment

ID: 6184762

I would suggest that you use:

  ComboObject.SetWindowText("your string");


Author Comment

ID: 6189181
I do not want to add to the combo list (as stated in question).
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

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

Accepted Solution

geo_134 earned 200 total points
ID: 6229570
 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.

Expert Comment

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


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 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