HEADER order and index issue

Medland, Bill Bill.Medland at accpac.com
Thu Jul 11 14:54:10 CDT 2002


Dear all

Before I spend days trying to find out, can someone tell me straight off?

There is a problem with the comctl32 header control and I want to know which
is the correct solution.
The result is that columns af the associated list control are sometimes put
in the wrong place.

Here's why!

It is a known issue that the first column of a listctrl is left-justified.
Therefore the Microsoft-accepted way to proceded with the list control is to
add a blank left column, add the columns after that with whatever
justification is desired and then delete the first column.

Assume we aren't doing any clever column reordering.

As the columns are added their headers' orders are equal to the indices.
But then the first is removed.

When we get to HEADER_Refresh it goes to display them in the correct order;
good.  However there is an implicit assumption in the code that given n
columns the orders there will be one column with order 0, one with 1, ...
one with n-1.

So
1. Is that assumption invalid?  If so then I'll change the code to display
the columns in the specified order, assuming that the orders may not be
sequential.
2. Is that assumption valid?  If so then I'll change it so that deleting a
column will modify the orders of the remaining ones.

Bill



More information about the wine-devel mailing list