Solved

Combo String

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

Accepted Solution

by:
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

CBN_SELCHANGE
message and use the code above.

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

Author Comment

by:matchz
ID: 1328136
Thx, Exactly what I want.
0
 
LVL 2

Expert Comment

by:jrmcg
ID: 1328137
Glad I could help..

J.R.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 49
Separate files macro - Errors on larger data set 18 69
NotAlone Challenge 20 83
changeXy challenge 13 81
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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 …
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

10 Experts available now in Live!

Get 1:1 Help Now