Combo String

Posted on 1999-01-21
Last Modified: 2013-11-20
How can I get the visible String (ie the String I selected)
from a ComboBox?
Question by:matchz
  • 2

Accepted Solution

jrmcg earned 50 total points
ID: 1328135
// this will retrieve the text at the given index.
CString strValue;
int index;

// CboBox is a control variable assigned to your CComboBox control

index = CboBox.GetCurSel();
CboBox.GetLBText(index, strValue);

if you want the text as soon as the item is selected use the

message and use the code above.

If you need any further help with it let me know...

Author Comment

ID: 1328136
Thx, Exactly what I want.

Expert Comment

ID: 1328137
Glad I could help..


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is it possible to combine several text files into one big one? (redhat v5 enterprise) 4 81
pre4 challenge 19 94
NotAlone Challenge 20 80
mapBully challenge 6 114
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now