Solved

Combo String

Posted on 1999-01-21
3
173 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
[X]
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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

623 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