Re: ListViews In Reverse

new topic     » goto parent     » topic index » view thread      » older message » newer message

To specify the index of a new item when using LVM_INSERTITEM, the
Win32.hlp file says that the iItem member of the LV_ITEM structure specifies
the index of the new item.
  I think I poked in a number such as #FFFF before I called LVM_INSERTITEM
to add items to the end rather than the beginning of the list.

----- Original Message -----
From: Jonas Temple <jktemple at yhti.net>
Subject: RE: ListViews In Reverse


>
>
>
> Virtual B wrote:
> > Seriously, is this something that just can't be done in a ListView?
>
> Virtual,
>
> The reason your items are shown in the reverse order you loaded them
> into is that Win32Lib uses a literal 0 on the LVM_INSERTITEM message
> sent to the list view.  This inserts the item at the beginning of the
> list.  The first item you inserted now becomes the second displayed and
> so on.  The only way around this is to code the SendMessage calls
> yourself, specifying the item index for insertion.  However, doing this
> will break the column sorting built into Win32Lib.  For an example of
> how you might do this, try my SQL4Less on the contributions page on the
> RDS web site.
>
> Hope this helps.
>
> Jonas
>
>
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu