• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

Combo String

How can I get the visible String (ie the String I selected)
from a ComboBox?
0
matchz
Asked:
matchz
  • 2
1 Solution
 
jrmcgCommented:
// 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
 
matchzAuthor Commented:
Thx, Exactly what I want.
0
 
jrmcgCommented:
Glad I could help..

J.R.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now