Click to See Complete Forum and Search --> : deleting an entry from a listbox


poxy
July 22nd, 2003, 11:49 PM
In deleting an entry in a listbox, I used the function below

SendDlgItemMessage(sptrDisplay->hWnd, IDC_LSTDISPLAY, LB_DELETESTRING, 0, 0);

Aside from this function, are there other API functions that can be use to delete an entry?

Thanks!

IUNKWN
July 23rd, 2003, 12:22 AM
I dont think so. There are macros defined in commctrl.h for list_view, imagelist, tabctrl etc but not for a listbox. I guess the only way to delete a string without using MFC is to do what you are doing.
::SendMessage(hWnd, LB_DELETESTRING, nIndex, 0);