bhas_purk 0 Newbie Poster

hi guys,
I am getting this weird problem when I sort items in a listview control.

Initially when my list has few items, it sorts fine. When the size of the list increases beyond a certain number of items, around 1000, then the LPARAM pointers passed to the sort function contain all bad pointers.

As you know, the first step is to cast the LPARAM pointer to a custom data type to get the fields. I do that and when the number of items is few, each of the casted pointers has valid data in it.
Now when the size of the list increases beyond 1000, even the first item LPARAM passed contains all invalid values.

any idea what could be the problem.
I know I might not be very clear in this description, but if you have experience using the sorting functions in CList Ctrl, I can give you more details as you ask.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.