mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 03:07:05 +00:00
[COMCTL32] Sync with Wine Staging 1.9.4. CORE-10912
svn path=/trunk/; revision=70846
This commit is contained in:
parent
6e92889aa6
commit
74d4ba7655
9 changed files with 102 additions and 42 deletions
|
@ -1153,7 +1153,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
||||||
* Gets the Reference data from a subclass.
|
* Gets the Reference data from a subclass.
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* hWnd [in] Handle to window which were subclassing
|
* hWnd [in] Handle to the window which we are subclassing
|
||||||
* pfnSubclass [in] Pointer to the subclass procedure
|
* pfnSubclass [in] Pointer to the subclass procedure
|
||||||
* uID [in] Unique identifier of the subclassing procedure
|
* uID [in] Unique identifier of the subclassing procedure
|
||||||
* pdwRef [out] Pointer to the reference data
|
* pdwRef [out] Pointer to the reference data
|
||||||
|
@ -1196,7 +1196,7 @@ BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
|
||||||
* Removes a window subclass.
|
* Removes a window subclass.
|
||||||
*
|
*
|
||||||
* PARAMS
|
* PARAMS
|
||||||
* hWnd [in] Handle to the window were subclassing
|
* hWnd [in] Handle to the window which we are subclassing
|
||||||
* pfnSubclass [in] Pointer to the subclass procedure
|
* pfnSubclass [in] Pointer to the subclass procedure
|
||||||
* uID [in] Unique identifier of this subclass
|
* uID [in] Unique identifier of this subclass
|
||||||
*
|
*
|
||||||
|
|
|
@ -763,7 +763,8 @@ ImageList_Create (INT cx, INT cy, UINT flags,
|
||||||
|
|
||||||
TRACE("(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow);
|
TRACE("(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow);
|
||||||
|
|
||||||
if (cx <= 0 || cy <= 0) return NULL;
|
if (cx < 0 || cy < 0) return NULL;
|
||||||
|
if (!((flags&ILC_COLORDDB) == ILC_COLORDDB) && (cx == 0 || cy == 0)) return NULL;
|
||||||
|
|
||||||
/* Create the IImageList interface for the image list */
|
/* Create the IImageList interface for the image list */
|
||||||
if (FAILED(ImageListImpl_CreateInstance(NULL, &IID_IImageList, (void **)&himl)))
|
if (FAILED(ImageListImpl_CreateInstance(NULL, &IID_IImageList, (void **)&himl)))
|
||||||
|
@ -1232,8 +1233,11 @@ ImageList_DrawEx (HIMAGELIST himl, INT i, HDC hdc, INT x, INT y,
|
||||||
return ImageList_DrawIndirect (&imldp);
|
return ImageList_DrawIndirect (&imldp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
static BOOL alpha_blend_image( HIMAGELIST himl, HDC srce_dc, HDC dest_dc, int dest_x, int dest_y,
|
static BOOL alpha_blend_image( HIMAGELIST himl, HDC srce_dc, HDC dest_dc, int dest_x, int dest_y,
|
||||||
|
#else
|
||||||
|
static BOOL alpha_blend_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y,
|
||||||
|
#endif
|
||||||
int src_x, int src_y, int cx, int cy, BLENDFUNCTION func,
|
int src_x, int src_y, int cx, int cy, BLENDFUNCTION func,
|
||||||
UINT style, COLORREF blend_col )
|
UINT style, COLORREF blend_col )
|
||||||
{
|
{
|
||||||
|
@ -1258,9 +1262,17 @@ static BOOL alpha_blend_image( HIMAGELIST himl, HDC srce_dc, HDC dest_dc, int de
|
||||||
info->bmiHeader.biYPelsPerMeter = 0;
|
info->bmiHeader.biYPelsPerMeter = 0;
|
||||||
info->bmiHeader.biClrUsed = 0;
|
info->bmiHeader.biClrUsed = 0;
|
||||||
info->bmiHeader.biClrImportant = 0;
|
info->bmiHeader.biClrImportant = 0;
|
||||||
|
#ifdef __REACTOS__
|
||||||
if (!(bmp = CreateDIBSection( srce_dc, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done;
|
if (!(bmp = CreateDIBSection( srce_dc, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done;
|
||||||
|
#else
|
||||||
|
if (!(bmp = CreateDIBSection( himl->hdcImage, info, DIB_RGB_COLORS, &bits, 0, 0 ))) goto done;
|
||||||
|
#endif
|
||||||
SelectObject( hdc, bmp );
|
SelectObject( hdc, bmp );
|
||||||
|
#ifdef __REACTOS__
|
||||||
BitBlt( hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY );
|
BitBlt( hdc, 0, 0, cx, cy, srce_dc, src_x, src_y, SRCCOPY );
|
||||||
|
#else
|
||||||
|
BitBlt( hdc, 0, 0, cx, cy, himl->hdcImage, src_x, src_y, SRCCOPY );
|
||||||
|
#endif
|
||||||
|
|
||||||
if (blend_col != CLR_NONE)
|
if (blend_col != CLR_NONE)
|
||||||
{
|
{
|
||||||
|
@ -1333,6 +1345,7 @@ done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
HDC saturate_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y,
|
HDC saturate_image( HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y,
|
||||||
int src_x, int src_y, int cx, int cy, COLORREF rgbFg)
|
int src_x, int src_y, int cx, int cy, COLORREF rgbFg)
|
||||||
{
|
{
|
||||||
|
@ -1392,6 +1405,7 @@ done:
|
||||||
/* return the handle to our desaturated dc, that will substitute its original counterpart in the next calls */
|
/* return the handle to our desaturated dc, that will substitute its original counterpart in the next calls */
|
||||||
return hdc;
|
return hdc;
|
||||||
}
|
}
|
||||||
|
#endif /* __REACTOS__ */
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* ImageList_DrawIndirect [COMCTL32.@]
|
* ImageList_DrawIndirect [COMCTL32.@]
|
||||||
|
@ -1469,6 +1483,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||||
oldImageFg = SetTextColor( hImageDC, RGB( 0, 0, 0 ) );
|
oldImageFg = SetTextColor( hImageDC, RGB( 0, 0, 0 ) );
|
||||||
oldImageBk = SetBkColor( hImageDC, RGB( 0xff, 0xff, 0xff ) );
|
oldImageBk = SetBkColor( hImageDC, RGB( 0xff, 0xff, 0xff ) );
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
/*
|
/*
|
||||||
* If the ILS_SATURATE bit is enabled we should multiply the
|
* If the ILS_SATURATE bit is enabled we should multiply the
|
||||||
* RGB colors of the original image by the contents of rgbFg.
|
* RGB colors of the original image by the contents of rgbFg.
|
||||||
|
@ -1483,6 +1498,7 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||||
pt.x = 0;
|
pt.x = 0;
|
||||||
pt.y = 0;
|
pt.y = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
has_alpha = (himl->has_alpha && himl->has_alpha[pimldp->i]);
|
has_alpha = (himl->has_alpha && himl->has_alpha[pimldp->i]);
|
||||||
if (!bMask && (has_alpha || (fState & ILS_ALPHA)))
|
if (!bMask && (has_alpha || (fState & ILS_ALPHA)))
|
||||||
|
@ -1504,7 +1520,11 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||||
|
|
||||||
if (bIsTransparent)
|
if (bIsTransparent)
|
||||||
{
|
{
|
||||||
|
#ifdef __REACTOS__
|
||||||
bResult = alpha_blend_image( himl, hImageListDC, pimldp->hdcDst, pimldp->x, pimldp->y,
|
bResult = alpha_blend_image( himl, hImageListDC, pimldp->hdcDst, pimldp->x, pimldp->y,
|
||||||
|
#else
|
||||||
|
bResult = alpha_blend_image( himl, pimldp->hdcDst, pimldp->x, pimldp->y,
|
||||||
|
#endif
|
||||||
pt.x, pt.y, cx, cy, func, fStyle, blend_col );
|
pt.x, pt.y, cx, cy, func, fStyle, blend_col );
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
@ -1514,7 +1534,11 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||||
|
|
||||||
hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour));
|
hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour));
|
||||||
PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY );
|
PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY );
|
||||||
|
#ifdef __REACTOS__
|
||||||
alpha_blend_image( himl, hImageListDC, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col );
|
alpha_blend_image( himl, hImageListDC, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col );
|
||||||
|
#else
|
||||||
|
alpha_blend_image( himl, hImageDC, 0, 0, pt.x, pt.y, cx, cy, func, fStyle, blend_col );
|
||||||
|
#endif
|
||||||
DeleteObject (SelectObject (hImageDC, hOldBrush));
|
DeleteObject (SelectObject (hImageDC, hOldBrush));
|
||||||
bResult = BitBlt( pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy, hImageDC, 0, 0, SRCCOPY );
|
bResult = BitBlt( pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy, hImageDC, 0, 0, SRCCOPY );
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -1608,6 +1632,9 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
|
if (fState & ILS_SATURATE) FIXME("ILS_SATURATE: unimplemented!\n");
|
||||||
|
#endif
|
||||||
if (fState & ILS_GLOW) FIXME("ILS_GLOW: unimplemented!\n");
|
if (fState & ILS_GLOW) FIXME("ILS_GLOW: unimplemented!\n");
|
||||||
if (fState & ILS_SHADOW) FIXME("ILS_SHADOW: unimplemented!\n");
|
if (fState & ILS_SHADOW) FIXME("ILS_SHADOW: unimplemented!\n");
|
||||||
|
|
||||||
|
@ -1892,8 +1919,6 @@ ImageList_GetIconSize (HIMAGELIST himl, INT *cx, INT *cy)
|
||||||
{
|
{
|
||||||
if (!is_valid(himl) || !cx || !cy)
|
if (!is_valid(himl) || !cx || !cy)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if ((himl->cx <= 0) || (himl->cy <= 0))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
*cx = himl->cx;
|
*cx = himl->cx;
|
||||||
*cy = himl->cy;
|
*cy = himl->cy;
|
||||||
|
|
|
@ -8820,6 +8820,7 @@ static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFl
|
||||||
if (infoPtr->dwStyle & LVS_OWNERDATA)
|
if (infoPtr->dwStyle & LVS_OWNERDATA)
|
||||||
{
|
{
|
||||||
INT nOldCount = infoPtr->nItemCount;
|
INT nOldCount = infoPtr->nItemCount;
|
||||||
|
infoPtr->nItemCount = nItems;
|
||||||
|
|
||||||
if (nItems < nOldCount)
|
if (nItems < nOldCount)
|
||||||
{
|
{
|
||||||
|
@ -8832,7 +8833,6 @@ static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
infoPtr->nItemCount = nItems;
|
|
||||||
LISTVIEW_UpdateScroll(infoPtr);
|
LISTVIEW_UpdateScroll(infoPtr);
|
||||||
|
|
||||||
/* the flags are valid only in ownerdata report and list modes */
|
/* the flags are valid only in ownerdata report and list modes */
|
||||||
|
@ -10281,6 +10281,9 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!infoPtr->bFocus)
|
||||||
|
SetFocus(infoPtr->hwndSelf);
|
||||||
|
|
||||||
if (infoPtr->dwLvExStyle & LVS_EX_ONECLICKACTIVATE)
|
if (infoPtr->dwLvExStyle & LVS_EX_ONECLICKACTIVATE)
|
||||||
if(lvHitTestInfo.iItem != -1) notify_itemactivate(infoPtr,&lvHitTestInfo);
|
if(lvHitTestInfo.iItem != -1) notify_itemactivate(infoPtr,&lvHitTestInfo);
|
||||||
}
|
}
|
||||||
|
@ -10367,9 +10370,6 @@ static LRESULT LISTVIEW_LButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT
|
||||||
LISTVIEW_DelayedEditItem);
|
LISTVIEW_DelayedEditItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!infoPtr->bFocus)
|
|
||||||
SetFocus(infoPtr->hwndSelf);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2955,7 +2955,11 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT iBand, BOOL show)
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
|
#ifdef __REACTOS__
|
||||||
REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM flags, RECT *lpRect)
|
REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM flags, RECT *lpRect)
|
||||||
|
#else
|
||||||
|
REBAR_SizeToRect (REBAR_INFO *infoPtr, const RECT *lpRect)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (!lpRect) return FALSE;
|
if (!lpRect) return FALSE;
|
||||||
|
|
||||||
|
@ -3732,7 +3736,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return REBAR_ShowBand (infoPtr, wParam, lParam);
|
return REBAR_ShowBand (infoPtr, wParam, lParam);
|
||||||
|
|
||||||
case RB_SIZETORECT:
|
case RB_SIZETORECT:
|
||||||
|
#ifdef __REACTOS__
|
||||||
return REBAR_SizeToRect (infoPtr, wParam, (LPRECT)lParam);
|
return REBAR_SizeToRect (infoPtr, wParam, (LPRECT)lParam);
|
||||||
|
#else
|
||||||
|
return REBAR_SizeToRect (infoPtr, (LPCRECT)lParam);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Messages passed to parent */
|
/* Messages passed to parent */
|
||||||
|
|
|
@ -6200,8 +6200,10 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wParam, const CREATESTRUCTW *lpcs)
|
||||||
infoPtr->clrBtnShadow = CLR_DEFAULT;
|
infoPtr->clrBtnShadow = CLR_DEFAULT;
|
||||||
infoPtr->szPadding.cx = DEFPAD_CX;
|
infoPtr->szPadding.cx = DEFPAD_CX;
|
||||||
infoPtr->szPadding.cy = DEFPAD_CY;
|
infoPtr->szPadding.cy = DEFPAD_CY;
|
||||||
|
#ifdef __REACTOS__
|
||||||
infoPtr->szSpacing.cx = DEFSPACE_CX;
|
infoPtr->szSpacing.cx = DEFSPACE_CX;
|
||||||
infoPtr->szSpacing.cy = DEFSPACE_CY;
|
infoPtr->szSpacing.cy = DEFSPACE_CY;
|
||||||
|
#endif
|
||||||
infoPtr->iListGap = DEFLISTGAP;
|
infoPtr->iListGap = DEFLISTGAP;
|
||||||
infoPtr->iTopMargin = default_top_margin(infoPtr);
|
infoPtr->iTopMargin = default_top_margin(infoPtr);
|
||||||
infoPtr->dwStyle = lpcs->style;
|
infoPtr->dwStyle = lpcs->style;
|
||||||
|
@ -6972,6 +6974,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return TOOLBAR_MouseLeave (infoPtr);
|
return TOOLBAR_MouseLeave (infoPtr);
|
||||||
|
|
||||||
case WM_CAPTURECHANGED:
|
case WM_CAPTURECHANGED:
|
||||||
|
if (hwnd == (HWND)lParam) return 0;
|
||||||
return TOOLBAR_CaptureChanged(infoPtr);
|
return TOOLBAR_CaptureChanged(infoPtr);
|
||||||
|
|
||||||
case WM_NCACTIVATE:
|
case WM_NCACTIVATE:
|
||||||
|
|
|
@ -91,6 +91,8 @@
|
||||||
|
|
||||||
#include "comctl32.h"
|
#include "comctl32.h"
|
||||||
|
|
||||||
|
#include <wine/exception.h>
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(tooltips);
|
WINE_DEFAULT_DEBUG_CHANNEL(tooltips);
|
||||||
|
|
||||||
static HICON hTooltipIcons[TTI_ERROR+1];
|
static HICON hTooltipIcons[TTI_ERROR+1];
|
||||||
|
@ -1063,10 +1065,19 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
|
||||||
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
|
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
|
||||||
}
|
}
|
||||||
else if (isW) {
|
else if (isW) {
|
||||||
INT len = lstrlenW (ti->lpszText);
|
__TRY
|
||||||
TRACE("add text %s!\n", debugstr_w(ti->lpszText));
|
{
|
||||||
toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
|
INT len = lstrlenW (ti->lpszText);
|
||||||
strcpyW (toolPtr->lpszText, ti->lpszText);
|
TRACE("add text %s!\n", debugstr_w(ti->lpszText));
|
||||||
|
toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
|
||||||
|
strcpyW (toolPtr->lpszText, ti->lpszText);
|
||||||
|
}
|
||||||
|
__EXCEPT_PAGE_FAULT
|
||||||
|
{
|
||||||
|
WARN("Invalid lpszText.\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
__ENDTRY
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
|
INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
|
||||||
|
|
|
@ -1214,9 +1214,12 @@ TRACKBAR_SetPos (TRACKBAR_INFO *infoPtr, BOOL fPosition, LONG lPosition)
|
||||||
|
|
||||||
if (infoPtr->lPos > infoPtr->lRangeMax)
|
if (infoPtr->lPos > infoPtr->lRangeMax)
|
||||||
infoPtr->lPos = infoPtr->lRangeMax;
|
infoPtr->lPos = infoPtr->lRangeMax;
|
||||||
infoPtr->flags |= TB_THUMBPOSCHANGED;
|
|
||||||
|
|
||||||
if (fPosition && oldPos != lPosition) TRACKBAR_InvalidateThumbMove(infoPtr, oldPos, lPosition);
|
if (fPosition && oldPos != lPosition)
|
||||||
|
{
|
||||||
|
TRACKBAR_UpdateThumb(infoPtr);
|
||||||
|
TRACKBAR_InvalidateThumbMove(infoPtr, oldPos, lPosition);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1803,7 +1806,7 @@ TRACKBAR_KeyDown (TRACKBAR_INFO *infoPtr, INT nVirtKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos != infoPtr->lPos) {
|
if (pos != infoPtr->lPos) {
|
||||||
infoPtr->flags |=TB_THUMBPOSCHANGED;
|
TRACKBAR_UpdateThumb (infoPtr);
|
||||||
TRACKBAR_InvalidateThumbMove (infoPtr, pos, infoPtr->lPos);
|
TRACKBAR_InvalidateThumbMove (infoPtr, pos, infoPtr->lPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1961,6 +1964,7 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
|
|
||||||
case WM_CAPTURECHANGED:
|
case WM_CAPTURECHANGED:
|
||||||
|
if (hwnd == (HWND)lParam) return 0;
|
||||||
return TRACKBAR_CaptureChanged (infoPtr);
|
return TRACKBAR_CaptureChanged (infoPtr);
|
||||||
|
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
|
|
|
@ -75,7 +75,7 @@ typedef struct tagTREEVIEW_INFO
|
||||||
HTREEITEM focusedItem; /* item that was under the cursor when WM_LBUTTONDOWN was received */
|
HTREEITEM focusedItem; /* item that was under the cursor when WM_LBUTTONDOWN was received */
|
||||||
HTREEITEM editItem; /* item being edited with builtin edit box */
|
HTREEITEM editItem; /* item being edited with builtin edit box */
|
||||||
|
|
||||||
HTREEITEM firstVisible; /* handle to first visible item */
|
HTREEITEM firstVisible; /* handle to item whose top edge is at y = 0 */
|
||||||
LONG maxVisibleOrder;
|
LONG maxVisibleOrder;
|
||||||
HTREEITEM dropItem; /* handle to item selected by drag cursor */
|
HTREEITEM dropItem; /* handle to item selected by drag cursor */
|
||||||
HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
|
HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
|
||||||
|
@ -141,7 +141,10 @@ typedef struct _TREEITEM /* HTREEITEM is a _TREEINFO *. */
|
||||||
LONG imageOffset;
|
LONG imageOffset;
|
||||||
LONG textOffset;
|
LONG textOffset;
|
||||||
LONG textWidth; /* horizontal text extent for pszText */
|
LONG textWidth; /* horizontal text extent for pszText */
|
||||||
LONG visibleOrder; /* visible ordering, 0 is first visible item */
|
LONG visibleOrder; /* Depth-first numbering of the items whose ancestors are all expanded,
|
||||||
|
corresponding to a top-to-bottom ordering in the tree view.
|
||||||
|
Each item takes up "item.iIntegral" spots in the visible order.
|
||||||
|
0 is the root's first child. */
|
||||||
const TREEVIEW_INFO *infoPtr; /* tree data this item belongs to */
|
const TREEVIEW_INFO *infoPtr; /* tree data this item belongs to */
|
||||||
} TREEVIEW_ITEM;
|
} TREEVIEW_ITEM;
|
||||||
|
|
||||||
|
@ -537,7 +540,7 @@ TREEVIEW_SendTreeviewNotify(const TREEVIEW_INFO *infoPtr, UINT code, UINT action
|
||||||
NMTREEVIEWW nmhdr;
|
NMTREEVIEWW nmhdr;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
TRACE("code:%d action:%x olditem:%p newitem:%p\n",
|
TRACE("code:%d action:0x%x olditem:%p newitem:%p\n",
|
||||||
code, action, oldItem, newItem);
|
code, action, oldItem, newItem);
|
||||||
|
|
||||||
memset(&nmhdr, 0, sizeof(NMTREEVIEWW));
|
memset(&nmhdr, 0, sizeof(NMTREEVIEWW));
|
||||||
|
@ -589,7 +592,7 @@ TREEVIEW_SendCustomDrawNotify(const TREEVIEW_INFO *infoPtr, DWORD dwDrawStage,
|
||||||
NMTVCUSTOMDRAW nmcdhdr;
|
NMTVCUSTOMDRAW nmcdhdr;
|
||||||
NMCUSTOMDRAW *nmcd;
|
NMCUSTOMDRAW *nmcd;
|
||||||
|
|
||||||
TRACE("drawstage:%x hdc:%p\n", dwDrawStage, hdc);
|
TRACE("drawstage:0x%x hdc:%p\n", dwDrawStage, hdc);
|
||||||
|
|
||||||
nmcd = &nmcdhdr.nmcd;
|
nmcd = &nmcdhdr.nmcd;
|
||||||
nmcd->dwDrawStage = dwDrawStage;
|
nmcd->dwDrawStage = dwDrawStage;
|
||||||
|
@ -636,7 +639,7 @@ TREEVIEW_SendCustomDrawItemNotify(const TREEVIEW_INFO *infoPtr, HDC hdc,
|
||||||
nmcd->lItemlParam = item->lParam;
|
nmcd->lItemlParam = item->lParam;
|
||||||
nmcdhdr->iLevel = item->iLevel;
|
nmcdhdr->iLevel = item->iLevel;
|
||||||
|
|
||||||
TRACE("drawstage:%x hdc:%p item:%lx, itemstate:%x, lItemlParam:%lx\n",
|
TRACE("drawstage:0x%x hdc:%p item:%lx, itemstate:0x%x, lItemlParam:0x%lx\n",
|
||||||
nmcd->dwDrawStage, nmcd->hdc, nmcd->dwItemSpec,
|
nmcd->dwDrawStage, nmcd->hdc, nmcd->dwItemSpec,
|
||||||
nmcd->uItemState, nmcd->lItemlParam);
|
nmcd->uItemState, nmcd->lItemlParam);
|
||||||
|
|
||||||
|
@ -795,8 +798,9 @@ static BOOL
|
||||||
TREEVIEW_HasChildren(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item)
|
TREEVIEW_HasChildren(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item)
|
||||||
{
|
{
|
||||||
TREEVIEW_UpdateDispInfo(infoPtr, item, TVIF_CHILDREN);
|
TREEVIEW_UpdateDispInfo(infoPtr, item, TVIF_CHILDREN);
|
||||||
|
/* Protect for a case when callback field is not changed by a host,
|
||||||
return item->cChildren > 0;
|
otherwise negative values trigger normal notifications. */
|
||||||
|
return item->cChildren != 0 && item->cChildren != I_CHILDRENCALLBACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT TREEVIEW_NotifyFormat (TREEVIEW_INFO *infoPtr, HWND hwndFrom, UINT nCommand)
|
static INT TREEVIEW_NotifyFormat (TREEVIEW_INFO *infoPtr, HWND hwndFrom, UINT nCommand)
|
||||||
|
@ -1171,7 +1175,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
|
||||||
|
|
||||||
if (tvItem->mask & TVIF_STATE)
|
if (tvItem->mask & TVIF_STATE)
|
||||||
{
|
{
|
||||||
TRACE("prevstate,state,mask:%x,%x,%x\n", item->state, tvItem->state,
|
TRACE("prevstate 0x%x, state 0x%x, mask 0x%x\n", item->state, tvItem->state,
|
||||||
tvItem->stateMask);
|
tvItem->stateMask);
|
||||||
item->state &= ~tvItem->stateMask;
|
item->state &= ~tvItem->stateMask;
|
||||||
item->state |= (tvItem->state & tvItem->stateMask);
|
item->state |= (tvItem->state & tvItem->stateMask);
|
||||||
|
@ -1179,7 +1183,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
|
||||||
|
|
||||||
if (tvItem->mask & TVIF_STATEEX)
|
if (tvItem->mask & TVIF_STATEEX)
|
||||||
{
|
{
|
||||||
FIXME("New extended state: %x\n", tvItem->uStateEx);
|
FIXME("New extended state: 0x%x\n", tvItem->uStateEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
item->callbackMask |= callbackSet;
|
item->callbackMask |= callbackSet;
|
||||||
|
@ -1337,7 +1341,7 @@ TREEVIEW_InsertItemT(TREEVIEW_INFO *infoPtr, const TVINSERTSTRUCTW *ptdi, BOOL i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TRACE("new item %p; parent %p, mask %x\n", newItem,
|
TRACE("new item %p; parent %p, mask 0x%x\n", newItem,
|
||||||
newItem->parent, tvItem->mask);
|
newItem->parent, tvItem->mask);
|
||||||
|
|
||||||
newItem->iLevel = newItem->parent->iLevel + 1;
|
newItem->iLevel = newItem->parent->iLevel + 1;
|
||||||
|
@ -1420,11 +1424,13 @@ TREEVIEW_RemoveAllChildren(TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *parentIt
|
||||||
static void
|
static void
|
||||||
TREEVIEW_UnlinkItem(const TREEVIEW_ITEM *item)
|
TREEVIEW_UnlinkItem(const TREEVIEW_ITEM *item)
|
||||||
{
|
{
|
||||||
TREEVIEW_ITEM *parentItem = item->parent;
|
TREEVIEW_ITEM *parentItem;
|
||||||
|
|
||||||
assert(item != NULL);
|
assert(item != NULL);
|
||||||
assert(item->parent != NULL); /* i.e. it must not be the root */
|
assert(item->parent != NULL); /* i.e. it must not be the root */
|
||||||
|
|
||||||
|
parentItem = item->parent;
|
||||||
|
|
||||||
if (parentItem->firstChild == item)
|
if (parentItem->firstChild == item)
|
||||||
parentItem->firstChild = item->nextSibling;
|
parentItem->firstChild = item->nextSibling;
|
||||||
|
|
||||||
|
@ -1518,6 +1524,7 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM item)
|
||||||
|
|
||||||
if (infoPtr->firstVisible == item)
|
if (infoPtr->firstVisible == item)
|
||||||
{
|
{
|
||||||
|
visible = TRUE;
|
||||||
if (item->nextSibling)
|
if (item->nextSibling)
|
||||||
newFirstVisible = item->nextSibling;
|
newFirstVisible = item->nextSibling;
|
||||||
else if (item->prevSibling)
|
else if (item->prevSibling)
|
||||||
|
@ -1553,11 +1560,13 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM item)
|
||||||
|
|
||||||
TREEVIEW_VerifyTree(infoPtr);
|
TREEVIEW_VerifyTree(infoPtr);
|
||||||
|
|
||||||
|
if (visible)
|
||||||
|
TREEVIEW_SetFirstVisible(infoPtr, newFirstVisible, TRUE);
|
||||||
|
|
||||||
if (!infoPtr->bRedraw) return TRUE;
|
if (!infoPtr->bRedraw) return TRUE;
|
||||||
|
|
||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
TREEVIEW_SetFirstVisible(infoPtr, newFirstVisible, TRUE);
|
|
||||||
TREEVIEW_RecalculateVisibleOrder(infoPtr, prev);
|
TREEVIEW_RecalculateVisibleOrder(infoPtr, prev);
|
||||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
TREEVIEW_UpdateScrollBars(infoPtr);
|
||||||
TREEVIEW_Invalidate(infoPtr, NULL);
|
TREEVIEW_Invalidate(infoPtr, NULL);
|
||||||
|
@ -1962,7 +1971,7 @@ TREEVIEW_SetInsertMarkColor(TREEVIEW_INFO *infoPtr, COLORREF color)
|
||||||
{
|
{
|
||||||
COLORREF prevColor = infoPtr->clrInsertMark;
|
COLORREF prevColor = infoPtr->clrInsertMark;
|
||||||
|
|
||||||
TRACE("%x\n", color);
|
TRACE("0x%08x\n", color);
|
||||||
infoPtr->clrInsertMark = color;
|
infoPtr->clrInsertMark = color;
|
||||||
|
|
||||||
return (LRESULT)prevColor;
|
return (LRESULT)prevColor;
|
||||||
|
@ -2134,7 +2143,7 @@ TREEVIEW_GetItemT(const TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem, BOOL isW)
|
||||||
tvItem->uStateEx = 0;
|
tvItem->uStateEx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("item <%p>, txt %p, img %d, mask %x\n",
|
TRACE("item <%p>, txt %p, img %d, mask 0x%x\n",
|
||||||
item, tvItem->pszText, tvItem->iImage, tvItem->mask);
|
item, tvItem->pszText, tvItem->iImage, tvItem->mask);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -2150,7 +2159,7 @@ TREEVIEW_SetItemT(TREEVIEW_INFO *infoPtr, const TVITEMEXW *tvItem, BOOL isW)
|
||||||
|
|
||||||
item = tvItem->hItem;
|
item = tvItem->hItem;
|
||||||
|
|
||||||
TRACE("item %d,mask %x\n", TREEVIEW_GetItemIndex(infoPtr, item),
|
TRACE("item %d, mask 0x%x\n", TREEVIEW_GetItemIndex(infoPtr, item),
|
||||||
tvItem->mask);
|
tvItem->mask);
|
||||||
|
|
||||||
if (!TREEVIEW_ValidItem(infoPtr, item))
|
if (!TREEVIEW_ValidItem(infoPtr, item))
|
||||||
|
@ -2245,7 +2254,7 @@ TREEVIEW_GetNextItem(const TREEVIEW_INFO *infoPtr, UINT which, HTREEITEM item)
|
||||||
|
|
||||||
if (retval)
|
if (retval)
|
||||||
{
|
{
|
||||||
TRACE("flags:%x, returns %p\n", which, retval);
|
TRACE("flags:0x%x, returns %p\n", which, retval);
|
||||||
return (LRESULT)retval;
|
return (LRESULT)retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2275,11 +2284,11 @@ TREEVIEW_GetNextItem(const TREEVIEW_INFO *infoPtr, UINT which, HTREEITEM item)
|
||||||
retval = TREEVIEW_GetPrevListItem(infoPtr, item);
|
retval = TREEVIEW_GetPrevListItem(infoPtr, item);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
TRACE("Unknown msg %x,item %p\n", which, item);
|
TRACE("Unknown msg 0x%x, item %p\n", which, item);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("flags:%x, item %p;returns %p\n", which, item, retval);
|
TRACE("flags: 0x%x, item %p;returns %p\n", which, item, retval);
|
||||||
return (LRESULT)retval;
|
return (LRESULT)retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2301,7 +2310,7 @@ TREEVIEW_ToggleItemState(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item)
|
||||||
unsigned int state;
|
unsigned int state;
|
||||||
|
|
||||||
state = STATEIMAGEINDEX(item->state);
|
state = STATEIMAGEINDEX(item->state);
|
||||||
TRACE("state:%x\n", state);
|
TRACE("state: 0x%x\n", state);
|
||||||
item->state &= ~TVIS_STATEIMAGEMASK;
|
item->state &= ~TVIS_STATEIMAGEMASK;
|
||||||
|
|
||||||
if (state < 3)
|
if (state < 3)
|
||||||
|
@ -2309,7 +2318,7 @@ TREEVIEW_ToggleItemState(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item)
|
||||||
|
|
||||||
item->state |= INDEXTOSTATEIMAGEMASK(state);
|
item->state |= INDEXTOSTATEIMAGEMASK(state);
|
||||||
|
|
||||||
TRACE("state:%x\n", state);
|
TRACE("state: 0x%x\n", state);
|
||||||
TREEVIEW_Invalidate(infoPtr, item);
|
TREEVIEW_Invalidate(infoPtr, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3683,7 +3692,7 @@ TREEVIEW_HitTest(const TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht)
|
||||||
}
|
}
|
||||||
|
|
||||||
lpht->hItem = item;
|
lpht->hItem = item;
|
||||||
TRACE("(%d,%d):result %x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
|
TRACE("(%d,%d):result 0x%x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
|
||||||
|
|
||||||
return (LRESULT)item;
|
return (LRESULT)item;
|
||||||
}
|
}
|
||||||
|
@ -3760,7 +3769,7 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TRACE("code=%x, id=%x, handle=%lx\n", HIWORD(wParam), LOWORD(wParam), lParam);
|
TRACE("code=0x%x, id=0x%x, handle=0x%lx\n", HIWORD(wParam), LOWORD(wParam), lParam);
|
||||||
|
|
||||||
switch (HIWORD(wParam))
|
switch (HIWORD(wParam))
|
||||||
{
|
{
|
||||||
|
@ -4383,7 +4392,7 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
|
||||||
|
|
||||||
assert(newSelect == NULL || TREEVIEW_ValidItem(infoPtr, newSelect));
|
assert(newSelect == NULL || TREEVIEW_ValidItem(infoPtr, newSelect));
|
||||||
|
|
||||||
TRACE("Entering item %p (%s), flag %x, cause %x, state %d\n",
|
TRACE("Entering item %p (%s), flag 0x%x, cause 0x%x, state %d\n",
|
||||||
newSelect, TREEVIEW_ItemName(newSelect), action, cause,
|
newSelect, TREEVIEW_ItemName(newSelect), action, cause,
|
||||||
newSelect ? newSelect->state : 0);
|
newSelect ? newSelect->state : 0);
|
||||||
|
|
||||||
|
@ -4994,7 +5003,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
TREEVIEW_INFO *infoPtr;
|
TREEVIEW_INFO *infoPtr;
|
||||||
LOGFONTW lf;
|
LOGFONTW lf;
|
||||||
|
|
||||||
TRACE("wnd %p, style %x\n", hwnd, GetWindowLongW(hwnd, GWL_STYLE));
|
TRACE("wnd %p, style 0x%x\n", hwnd, GetWindowLongW(hwnd, GWL_STYLE));
|
||||||
|
|
||||||
infoPtr = Alloc(sizeof(TREEVIEW_INFO));
|
infoPtr = Alloc(sizeof(TREEVIEW_INFO));
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ reactos/dll/win32/browseui # Out of sync
|
||||||
reactos/dll/win32/cabinet # Synced to WineStaging-1.9.4
|
reactos/dll/win32/cabinet # Synced to WineStaging-1.9.4
|
||||||
reactos/dll/win32/clusapi # Synced to WineStaging-1.7.55
|
reactos/dll/win32/clusapi # Synced to WineStaging-1.7.55
|
||||||
reactos/dll/win32/comcat # Synced to WineStaging-1.7.55
|
reactos/dll/win32/comcat # Synced to WineStaging-1.7.55
|
||||||
reactos/dll/win32/comctl32 # Synced to WineStaging-1.7.55
|
reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.4
|
||||||
reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.55
|
reactos/dll/win32/comdlg32 # Synced to WineStaging-1.7.55
|
||||||
reactos/dll/win32/compstui # Synced to WineStaging-1.7.55
|
reactos/dll/win32/compstui # Synced to WineStaging-1.7.55
|
||||||
reactos/dll/win32/credui # Synced to WineStaging-1.7.55
|
reactos/dll/win32/credui # Synced to WineStaging-1.7.55
|
||||||
|
|
Loading…
Reference in a new issue