97#define DIVIDER_WIDTH 10
98#define HOT_DIVIDER_WIDTH 2
99#define MAX_HEADER_TEXT_LEN 260
100#define HDN_UNICODE_OFFSET 20
101#define HDN_FIRST_UNICODE (HDN_FIRST-HDN_UNICODE_OFFSET)
103#define HDI_SUPPORTED_FIELDS (HDI_WIDTH|HDI_TEXT|HDI_FORMAT|HDI_LPARAM|HDI_BITMAP|HDI_IMAGE|HDI_ORDER)
104#define HDI_UNSUPPORTED_FIELDS (HDI_FILTER)
105#define HDI_UNKNOWN_FIELDS (~(HDI_SUPPORTED_FIELDS|HDI_UNSUPPORTED_FIELDS|HDI_DI_SETITEM))
106#define HDI_COMCTL32_4_0_FIELDS (HDI_WIDTH|HDI_TEXT|HDI_FORMAT|HDI_LPARAM|HDI_BITMAP)
149 static const WCHAR emptyString[] = {0};
177 if ((iorder <0) || iorder >= infoPtr->
uNumItem)
179 return infoPtr->
order[iorder];
188 TRACE(
"%d: %d->%d\n", iItem, lpItem->
iOrder, iNewOrder);
189 if (lpItem->
iOrder < iNewOrder)
193 (iNewOrder - lpItem->
iOrder) *
sizeof(
INT));
195 if (iNewOrder < lpItem->iOrder)
198 &infoPtr->
order[iNewOrder],
199 (lpItem->
iOrder - iNewOrder) *
sizeof(
INT));
201 infoPtr->
order[iNewOrder] = iItem;
204 for (
i = nMin;
i <= nMax;
i++)
226 return (infoPtr->
dwStyle & HDS_NOSIZING) || (infoPtr->
items[iItem].
fmt & HDF_FIXEDWIDTH);
269 if (iDivider < infoPtr->uNumItem)
271 lpItem = &infoPtr->
items[iDivider];
344 data->rdh.dwSize =
sizeof(
data->rdh);
346 data->rdh.nCount = 0;
357 for (
i = 0;
i <
h;
i++,
y += yinc)
363 rect->bottom =
y + 1;
384 if (
r.right -
r.left == 0)
458 INT sort_w, sort_x, sort_h;
462 cw = iw =
bw = sort_w = sort_h = 0;
463 rw =
r.right -
r.left;
464 rh =
r.bottom -
r.top;
483 sort_w = 2 * sort_h - 1 + infoPtr->
iMargin * 2;
487 iw = img_cx + 2 * infoPtr->
iMargin;
508 cx =
r.left +
rw / 2 - cw / 2;
515 if (
cx + cw >
r.right)
520 tw = cw - infoPtr->
iMargin * 2;
548 if (sort_w || iw ||
bw) {
565 BitBlt (hClipDC, bx,
r.top + (rh -
bmp.bmHeight) / 2,
572 ix,
r.top + (rh - img_cy) / 2,
717 for (iCount = 0; iCount < infoPtr->
uNumItem; iCount++) {
728 TRACE(
"ON HEADER %d\n", iCount);
739 TRACE(
"ON HEADER %d\n", *pItem);
745 TRACE(
"ON DIVOPEN %d\n", *pItem);
751 TRACE(
"ON DIVIDER %d\n", *pItem);
762 TRACE(
"ON DIVIDER %d\n", *pItem);
768 TRACE(
"ON HEADER %d\n", iCount);
783 TRACE(
"ON DIVOPEN %d\n", *pItem);
789 TRACE(
"ON DIVIDER %d\n", *pItem);
802 if (lpPt->
x <
rect.left) {
806 else if (lpPt->
x >
rect.right) {
811 if (lpPt->
y <
rect.top) {
815 else if (lpPt->
y >
rect.bottom) {
822 TRACE(
"flags=0x%X\n", *pFlags);
862 *ppvScratch =
dest->pszText;
869 *ppvScratch =
dest->pszText;
924 nmhdr.
pitem = lpItem;
954 ERR(
"invalid mask value 0x%x\n", iValue);
981 void *pvBuffer =
NULL;
987 ERR(
"(): function called without a call to FreeCallbackItems\n");
1009 dispInfo.
iItem = iItem;
1016 TRACE(
"SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n",
1019 (
void*) dispInfo.
lParam);
1089 lpItem = &infoPtr->
items[iItem];
1149 if (iDivider<-1 || iDivider>(
int)infoPtr->
uNumItem)
1175 TRACE(
"[iItem=%d]\n", iItem);
1177 if ((iItem < 0) || (iItem >= (
INT)infoPtr->
uNumItem))
1197 if (infoPtr->
order[
i] > iItem)
1228 TRACE(
"[nItem=%d]\n", nItem);
1234 if ((nItem < 0) || (nItem >= (
INT)infoPtr->
uNumItem))
1239 TRACE(
"mask %x contains unknown fields. Using only comctl32 4.0 fields\n",
mask);
1243 lpItem = &infoPtr->
items[nItem];
1287 if ((iItem < 0) || (iItem >= (
INT)infoPtr->
uNumItem))
1302 if ((
UINT)size <infoPtr->uNumItem)
1314 for(
i = 0;
i < to;
i++)
1394 if (phti->
flags & outside)
1395 return phti->
iItem = -1;
1409 if ((phdi ==
NULL) || (nItem < 0) || (phdi->
mask == 0))
1418 else if (infoPtr->
uNumItem < iOrder)
1432 infoPtr->
order[iOrder] = nItem;
1435 if (
i != iOrder && infoPtr->
order[
i] >= nItem)
1440 lpItem = &infoPtr->
items[nItem];
1451 lpItem->
fmt &= ~HDF_STRING;
1456 lpItem->
fmt &= ~HDF_BITMAP;
1484 TRACE(
"Layout x=%d y=%d cx=%d cy=%d\n",
1500 himlOld = infoPtr->
himl;
1534 if ((nItem < 0) || (nItem >= (
INT)infoPtr->
uNumItem))
1537 TRACE(
"[nItem=%d]\n", nItem);
1546 lpItem = &infoPtr->
items[nItem];
1582 infoPtr = heap_alloc_zero (
sizeof(*infoPtr));
1634 if (infoPtr->
items) {
1635 lpItem = infoPtr->
items;
1636 for (nItem = 0; nItem < infoPtr->
uNumItem; nItem++, lpItem++)
1714 TRACE(
"Pressed item %d.\n", nItem);
1733 TRACE(
"Begin tracking item %d.\n", nItem);
1772 if (iNewOrder > lpItem->
iOrder)
1776 if (iNewOrder != -1 &&
1878 BOOL hotTrackEnabled =
1887 if (hotTrackEnabled) {
1902 if (hDragItem !=
NULL)
1905 TRACE(
"Starting item drag\n");
1948 if (nWidth < 0) nWidth = 0;
1956 rcScroll = rcClient;
1988 if (hotTrackEnabled) {
1996 tme.
cbSize =
sizeof( tme );
2107 TRACE(
"(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
2245 case WM_NOTIFYFORMAT:
2251 case WM_THEMECHANGED:
2270 case WM_STYLECHANGED:
2279 ERR(
"unknown msg %04x wp=%04lx lp=%08lx\n",
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
INT Str_GetPtrWtoA(LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN
BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
INT WINAPI Str_GetPtrW(LPCWSTR, LPWSTR, INT)
COMCTL32_SysColor comctl32_color
INT WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
VOID WINAPI ImageList_EndDrag(void)
BOOL WINAPI ImageList_DragMove(INT x, INT y)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
BOOL WINAPI ImageList_DrawEx(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, INT dx, INT dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle)
BOOL WINAPI ImageList_BeginDrag(HIMAGELIST himlTrack, INT iTrack, INT dxHotspot, INT dyHotspot)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
BOOL WINAPI ImageList_DragShowNolock(BOOL bShow)
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
BOOL WINAPI Str_SetPtrW(LPWSTR *lppDest, LPCWSTR lpSrc)
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)
HRESULT WINAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, const RECT *pBoundingRect, RECT *pExtentRect)
HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pBoundingRect, RECT *pContentRect)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLuint GLdouble GLdouble GLint GLint order
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
#define NM_RELEASEDCAPTURE
#define HDM_SETORDERARRAY
#define LPSTR_TEXTCALLBACKW
#define HDM_GETBITMAPMARGIN
#define HDM_SETUNICODEFORMAT
#define HDM_GETUNICODEFORMAT
#define CDRF_NOTIFYITEMDRAW
#define CDRF_NOTIFYPOSTPAINT
#define HDF_BITMAP_ON_RIGHT
#define HDM_SETHOTDIVIDER
#define HDN_ITEMDBLCLICKW
#define HDN_ITEMCHANGINGW
#define HDM_GETORDERARRAY
#define HDM_SETBITMAPMARGIN
#define HDN_DIVIDERDBLCLICKW
#define HDM_SETFILTERCHANGETIMEOUT
#define HDM_CREATEDRAGIMAGE
static unsigned __int64 next
#define FIELD_OFFSET(t, f)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI RectVisible(_In_ HDC, _In_ LPCRECT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HRGN WINAPI ExtCreateRegion(_In_opt_ const XFORM *lpx, _In_ DWORD nCount, _In_reads_bytes_(nCount) const RGNDATA *lpData)
COLORREF WINAPI GetBkColor(_In_ HDC)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define GetWindowLongPtrW
BOOL WINAPI ReleaseCapture(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)
#define WM_SYSCOLORCHANGE
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)