Is there any trick to deleting an item from a ListView?
I know I'm passing it a valid index number but the function always returns zero (failed).
Here's the sub routine...
------------------
George W. Bleck
Senior System Engineer
KeySpan Corporation
I know I'm passing it a valid index number but the function always returns zero (failed).
Here's the sub routine...
Code:
SUB EntryDelete( BYVAL hDlg AS DWORD ) LOCAL hlvPrinters AS LONG LOCAL lngIndex AS LONG CONTROL HANDLE hDlg, %lvPrinters TO hlvPrinters lngIndex = ListView_GetNextItem( hlvPrinters, - 1, %LVNI_SELECTED ) IF lngIndex < > - 1 THEN IF MessageBox( hDlg, "Are you sure you wish to delete the highlighted entry?", "Title Message", %MB_YESNO OR %MB_ICONQUESTION OR %MB_DEFBUTTON2 ) = %IDYES THEN listview_deleteitem hDlg, lngIndex END IF END IF END SUB
------------------
George W. Bleck
Senior System Engineer
KeySpan Corporation
Comment