Commit b4e7e257 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/header: Make Header_* macros match PSDK.

parent 03c6a0d9
...@@ -4698,7 +4698,7 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn) ...@@ -4698,7 +4698,7 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn)
LISTVIEW_GetHeaderRect(infoPtr, nColumn, &rcCol); LISTVIEW_GetHeaderRect(infoPtr, nColumn, &rcCol);
if (!Header_DeleteItem(infoPtr->hwndHeader, nColumn)) if (!SendMessageW(infoPtr->hwndHeader, HDM_DELETEITEM, nColumn, 0))
return FALSE; return FALSE;
Free(DPA_GetPtr(infoPtr->hdpaColumns, nColumn)); Free(DPA_GetPtr(infoPtr->hdpaColumns, nColumn));
...@@ -6019,7 +6019,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR ...@@ -6019,7 +6019,7 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR
} }
if (infoPtr->hwndHeader) if (infoPtr->hwndHeader)
return Header_GetItemRect(infoPtr->hwndHeader, lprc->top, lprc); return SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, lprc->top, (LPARAM)lprc);
else else
{ {
memset(lprc, 0, sizeof(RECT)); memset(lprc, 0, sizeof(RECT));
...@@ -6983,7 +6983,8 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, ...@@ -6983,7 +6983,8 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
if (DPA_InsertPtr(infoPtr->hdpaColumns, nNewColumn, lpColumnInfo) == -1) goto fail; if (DPA_InsertPtr(infoPtr->hdpaColumns, nNewColumn, lpColumnInfo) == -1) goto fail;
if (lpColumn->mask & LVCF_FMT) lpColumnInfo->fmt = lpColumn->fmt; if (lpColumn->mask & LVCF_FMT) lpColumnInfo->fmt = lpColumn->fmt;
if (!Header_GetItemRect(infoPtr->hwndHeader, nNewColumn, &lpColumnInfo->rcHeader)) goto fail; if (!SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, nNewColumn, (LPARAM)&lpColumnInfo->rcHeader))
goto fail;
/* now we have to actually adjust the data */ /* now we have to actually adjust the data */
if (!(infoPtr->dwStyle & LVS_OWNERDATA) && infoPtr->nItemCount > 0) if (!(infoPtr->dwStyle & LVS_OWNERDATA) && infoPtr->nItemCount > 0)
......
...@@ -974,14 +974,14 @@ typedef struct tagNMHDFILTERBTNCLICK ...@@ -974,14 +974,14 @@ typedef struct tagNMHDFILTERBTNCLICK
} NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK; } NMHDFILTERBTNCLICK, *LPNMHDFILTERBTNCLICK;
#define Header_GetItemCount(hwndHD) \ #define Header_GetItemCount(hwndHD) \
(INT)SNDMSGA((hwndHD),HDM_GETITEMCOUNT,0,0L) (INT)SNDMSG((hwndHD),HDM_GETITEMCOUNT,0,0L)
#define Header_InsertItemA(hwndHD,i,phdi) \ #define Header_InsertItemA(hwndHD,i,phdi) \
(INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi)) (INT)SNDMSGA((hwndHD),HDM_INSERTITEMA,(WPARAM)(INT)(i),(LPARAM)(const HDITEMA*)(phdi))
#define Header_InsertItemW(hwndHD,i,phdi) \ #define Header_InsertItemW(hwndHD,i,phdi) \
(INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi)) (INT)SNDMSGW((hwndHD),HDM_INSERTITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
#define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem) #define Header_InsertItem WINELIB_NAME_AW(Header_InsertItem)
#define Header_DeleteItem(hwndHD,i) \ #define Header_DeleteItem(hwndHD,i) \
(BOOL)SNDMSGA((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L) (BOOL)SNDMSG((hwndHD),HDM_DELETEITEM,(WPARAM)(INT)(i),0L)
#define Header_GetItemA(hwndHD,i,phdi) \ #define Header_GetItemA(hwndHD,i,phdi) \
(BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi)) (BOOL)SNDMSGA((hwndHD),HDM_GETITEMA,(WPARAM)(INT)(i),(LPARAM)(HDITEMA*)(phdi))
#define Header_GetItemW(hwndHD,i,phdi) \ #define Header_GetItemW(hwndHD,i,phdi) \
...@@ -993,27 +993,27 @@ typedef struct tagNMHDFILTERBTNCLICK ...@@ -993,27 +993,27 @@ typedef struct tagNMHDFILTERBTNCLICK
(BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi)) (BOOL)SNDMSGW((hwndHD),HDM_SETITEMW,(WPARAM)(INT)(i),(LPARAM)(const HDITEMW*)(phdi))
#define Header_SetItem WINELIB_NAME_AW(Header_SetItem) #define Header_SetItem WINELIB_NAME_AW(Header_SetItem)
#define Header_Layout(hwndHD,playout) \ #define Header_Layout(hwndHD,playout) \
(BOOL)SNDMSGA((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout)) (BOOL)SNDMSG((hwndHD),HDM_LAYOUT,0,(LPARAM)(LPHDLAYOUT)(playout))
#define Header_GetItemRect(hwnd,iItem,lprc) \ #define Header_GetItemRect(hwnd,iItem,lprc) \
(BOOL)SNDMSGA((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc) (BOOL)SNDMSG((hwnd),HDM_GETITEMRECT,(WPARAM)iItem,(LPARAM)lprc)
#define Header_SetImageList(hwnd,himl) \ #define Header_SetImageList(hwnd,himl) \
(HIMAGELIST)SNDMSGA((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl) (HIMAGELIST)SNDMSG((hwnd),HDM_SETIMAGELIST,0,(LPARAM)himl)
#define Header_GetImageList(hwnd) \ #define Header_GetImageList(hwnd) \
(HIMAGELIST)SNDMSGA((hwnd),HDM_GETIMAGELIST,0,0) (HIMAGELIST)SNDMSG((hwnd),HDM_GETIMAGELIST,0,0)
#define Header_OrderToIndex(hwnd,i) \ #define Header_OrderToIndex(hwnd,i) \
(INT)SNDMSGA((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0) (INT)SNDMSG((hwnd),HDM_ORDERTOINDEX,(WPARAM)i,0)
#define Header_CreateDragImage(hwnd,i) \ #define Header_CreateDragImage(hwnd,i) \
(HIMAGELIST)SNDMSGA((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0) (HIMAGELIST)SNDMSG((hwnd),HDM_CREATEDRAGIMAGE,(WPARAM)i,0)
#define Header_GetOrderArray(hwnd,iCount,lpi) \ #define Header_GetOrderArray(hwnd,iCount,lpi) \
(BOOL)SNDMSGA((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi) (BOOL)SNDMSG((hwnd),HDM_GETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
#define Header_SetOrderArray(hwnd,iCount,lpi) \ #define Header_SetOrderArray(hwnd,iCount,lpi) \
(BOOL)SNDMSGA((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi) (BOOL)SNDMSG((hwnd),HDM_SETORDERARRAY,(WPARAM)iCount,(LPARAM)lpi)
#define Header_SetHotDivider(hwnd,fPos,dw) \ #define Header_SetHotDivider(hwnd,fPos,dw) \
(INT)SNDMSGA((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw) (INT)SNDMSG((hwnd),HDM_SETHOTDIVIDER,(WPARAM)fPos,(LPARAM)dw)
#define Header_SetUnicodeFormat(hwnd,fUnicode) \ #define Header_SetUnicodeFormat(hwnd,fUnicode) \
(BOOL)SNDMSGA((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0) (BOOL)SNDMSG((hwnd),HDM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0)
#define Header_GetUnicodeFormat(hwnd) \ #define Header_GetUnicodeFormat(hwnd) \
(BOOL)SNDMSGA((hwnd),HDM_GETUNICODEFORMAT,0,0) (BOOL)SNDMSG((hwnd),HDM_GETUNICODEFORMAT,0,0)
/* Win32 5.1 Button Theme */ /* Win32 5.1 Button Theme */
#define WC_BUTTONA "Button" #define WC_BUTTONA "Button"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment