Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Geting the value of a selection with a "List Control" control 2

Status
Not open for further replies.

vlitzer

Programmer
Apr 30, 2002
31
AR
Hi, im having some trouble with the list control. Others times ive used the standar listbox that suplies my needs, but now i need some more versatile control, so ive used the list control. Ive succeed in the task of creating entries in the table, but, even that i searched this forum, MSDN, and the example in the documentation, i dont know how to GET the value selected.

Thanks for your help!
 
ive already tried that function.. but i dont realize how it works.

Thanks for answering!
 
yes, ive already downloaded that example.. but it didnt use that function. That example shows how to use the exelents features of the control, but it didnt show how to use that function :(

thanks anyway.
 
Is this what your looking for?


Code:
[blue]
POSITION myPos = YourListControl.GetFirstSelectedItemPosition();
int mySel = YourListControl.GetNextSelectedItem(nPos);

CString Text = YourListControl.GetItemText(mySel,0);
[/blue]
[green]//0 can be changed to 1 to get the next field over.. etc..[/green]

Hope that Helps!
Ron

cout << "If you don't know where you want to go, we'll make sure you get taken";
 
YES!!!!!! that's exactly i looking for!!!!!
1000 thanks!!!! i was almost to trow away that control!!!
if i could thank you 1000 times i do it!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top