Solved

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

Posted on 2001-06-12
6
369 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 

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

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

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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