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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Listboxes

Status
Not open for further replies.

SteveCRM

Programmer
Oct 30, 2000
8
US
all I really need to know is how to add items, remove items, and clear the listbox. Also, how would I get text from a certain index?
 
Look in the help file and see

CListBox::FindString
CListBox::AddString
CListBox::InsertString
CListBox::DeleteString
CListBox::GetText

There are others but the help file should be the best help to you.

Matt

 
Are you using WinAPI or MFC? John Fill
1c.bmp


ivfmd@mail.md
 
Add an item:
SendMessage(ListBoxHandle, LB_ADDSTRING, 0, (LPARAM)pStr);

Remove item:
SendMessage(ghList, LB_DELETESTRING, (WPARAM)index, 0);

Clear all:
SendMessage(hList, LB_RESETCONTENT, 0, 0);


--Will Duty
wduty@radicalfringe.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top