Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Re: Virtual Lis...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 185 of 276
Post > Topic >>

Re: Virtual Listview DeleteItem ProblemsPB/Win 8.01

by "Michael Mattias" <michael.mattias@[EMAIL PROTECTED] > Apr 22, 2006 at 01:36 PM

"Dankert" <a@[EMAIL PROTECTED]
> wrote in message
news:kCj2g.563$5J6.505@[EMAIL PROTECTED]
> Hello,
>
>   x = ListView_GetSelectionMark(hCtl) 'x contains the correct index
number
> of the item to be deleted
>   ListView_DeleteItem(hCtl,x)  'The item which get deleted is always
item
x
> + 2.

If, as your subject line suggests, this is a VIRTUAL listview, you don't
delete items from it, you use ListView_SetItemCountEx to reduce by one the
number of items and adjust the contents of whatever  you are using to
provide the item text when the control asks for it. A real virtual ("real
virtual?"  That's sure oxymoronic!) listview is one created with style
LVS_OWNERDATA. But you don't show the actual styles used; and in this case
it really really makes a difference.

Further, the GetSelectionMark function itself....  I've have problems with
it, so I just use ListView_FindNextItem  hCtrl, -1&, LVNI_SELECTED to find
the index of the first selected item. I think the problems are related to
the fact that GetSelectionMark was designed to find the first selection of
multiple selections, not "THE" selected item.

MCM
 




 3 Posts in Topic:
Virtual Listview DeleteItem ProblemsPB/Win 8.01
"Dankert" <a  2006-04-22 07:58:23 
Re: Virtual Listview DeleteItem ProblemsPB/Win 8.01
"Michael Mattias&quo  2006-04-22 13:36:22 
Re: Virtual Listview DeleteItem ProblemsPB/Win 8.01
"Dankert" <a  2006-04-22 18:22:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:29:41 CDT 2008.