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 3 of 3 Topic 185 of 276
Post > Topic >>

Re: Virtual Listview DeleteItem ProblemsPB/Win 8.01

by "Dankert" <a@[EMAIL PROTECTED] > Apr 22, 2006 at 06:22 PM

"Michael Mattias" <michael.mattias@[EMAIL PROTECTED]
> skrev i melding 
news:qjq2g.62783$F_3.15116@[EMAIL PROTECTED]
> "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.

Yes, it is created with the %LVS_OWNERDATA style.


> 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

Thanks, I'll try this approach next time I'm in need of a virtual 
listview.Right now a none virtual listview can do, so I changed it to a
such 
one.
--
Dankert
 




 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 Fri Jul 25 15:28:16 CDT 2008.