Re: ListViews In Reverse
- Posted by Jason <mirwalds at swbell.net> Jul 28, 2001
- 339 views
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 > > > >