ListView_InsertColumn() question

Andrew Talbot Andrew.Talbot at talbotville.com
Fri Oct 6 13:40:56 CDT 2006


Can you verify something for me, please?

The SDK declares ListView_InsertColumn() as:

int ListView_InsertColumn(
    HWND hwnd,
    int iCol,
    const LPLVCOLUMN pcol
);

In commctrl.h, we have:

#define ListView_InsertColumnA(hwnd,iCol,pcol) \
    (INT)SNDMSGA((hwnd),LVM_INSERTCOLUMNA,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNA *)(pcol))
#define ListView_InsertColumnW(hwnd,iCol,pcol) \
    (INT)SNDMSGW((hwnd),LVM_INSERTCOLUMNW,(WPARAM)(INT)(iCol),(LPARAM)(const LVCOLUMNW *)(pcol))
#define ListView_InsertColumn WINELIB_NAME_AW(ListView_InsertColumn)

Given (for a type T) that const T * and T const * are equivalent, and given
the left-to-right nature of pointer declarations, am I not right in thinking
that const LPLVCOLUMN pcol is really equivalent to:

    LVCOLUMN * const pcol;

not

    const LVCOLUMN *pcol;

?

Thanks,

-- Andy.





More information about the wine-devel mailing list