Author: akhaldi Date: Thu Aug 18 11:09:45 2016 New Revision: 72320
URL: http://svn.reactos.org/svn/reactos?rev=72320&view=rev Log: [COMCTL32] Sync with Wine Staging 1.9.16. CORE-11866
Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff trunk/reactos/dll/win32/comctl32/draglist.c trunk/reactos/dll/win32/comctl32/dsa.c trunk/reactos/dll/win32/comctl32/imagelist.c trunk/reactos/dll/win32/comctl32/listview.c trunk/reactos/dll/win32/comctl32/monthcal.c trunk/reactos/dll/win32/comctl32/progress.c trunk/reactos/dll/win32/comctl32/propsheet.c trunk/reactos/dll/win32/comctl32/rebar.c trunk/reactos/dll/win32/comctl32/status.c trunk/reactos/dll/win32/comctl32/tab.c trunk/reactos/dll/win32/comctl32/theme_button.c trunk/reactos/dll/win32/comctl32/theme_combo.c trunk/reactos/dll/win32/comctl32/toolbar.c trunk/reactos/dll/win32/comctl32/tooltips.c trunk/reactos/dll/win32/comctl32/trackbar.c trunk/reactos/dll/win32/comctl32/treeview.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32... ============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -1,5 +1,5 @@ diff -pudN e:\wine\dlls\comctl32/comctl32.h e:\reactos\dll\win32\comctl32/comctl32.h ---- e:\wine\dlls\comctl32/comctl32.h 2016-05-31 18:00:02 +0100 +--- e:\wine\dlls\comctl32/comctl32.h 2016-08-14 19:11:25 +0100 +++ e:\reactos\dll\win32\comctl32/comctl32.h 2014-03-05 11:47:40 +0100 @@ -53,67 +53,6 @@ extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN; @@ -79,7 +79,7 @@ typedef struct _SUBCLASSPROCS { SUBCLASSPROC subproc; diff -pudN e:\wine\dlls\comctl32/commctrl.c e:\reactos\dll\win32\comctl32/commctrl.c ---- e:\wine\dlls\comctl32/commctrl.c 2016-05-31 18:00:02 +0100 +--- e:\wine\dlls\comctl32/commctrl.c 2016-08-14 19:11:25 +0100 +++ e:\reactos\dll\win32\comctl32/commctrl.c 2016-03-01 20:00:53 +0100 @@ -60,6 +60,19 @@
@@ -333,8 +333,8 @@ + return TRUE; +} diff -pudN e:\wine\dlls\comctl32/imagelist.c e:\reactos\dll\win32\comctl32/imagelist.c ---- e:\wine\dlls\comctl32/imagelist.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/imagelist.c 2016-06-05 19:39:00 +0100 +--- e:\wine\dlls\comctl32/imagelist.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/imagelist.c 2016-08-18 12:03:13 +0100 @@ -33,7 +33,7 @@ * * TODO: @@ -504,8 +504,8 @@
Common subdirectories: e:\wine\dlls\comctl32/lang and e:\reactos\dll\win32\comctl32/lang diff -pudN e:\wine\dlls\comctl32/listview.c e:\reactos\dll\win32\comctl32/listview.c ---- e:\wine\dlls\comctl32/listview.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/listview.c 2016-06-05 19:39:00 +0100 +--- e:\wine\dlls\comctl32/listview.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/listview.c 2016-08-18 12:03:13 +0100 @@ -287,6 +287,9 @@ typedef struct tagLISTVIEW_INFO COLORREF clrBk; COLORREF clrText; @@ -516,7 +516,7 @@
/* font */ HFONT hDefaultFont; -@@ -1678,8 +1681,24 @@ static inline BOOL LISTVIEW_GetItemW(con +@@ -1696,8 +1699,24 @@ static inline BOOL LISTVIEW_GetItemW(con /* used to handle collapse main item column case */ static inline BOOL LISTVIEW_DrawFocusRect(const LISTVIEW_INFO *infoPtr, HDC hdc) { @@ -541,7 +541,7 @@ }
/* Listview invalidation functions: use _only_ these functions to invalidate */ -@@ -4671,7 +4690,12 @@ static void LISTVIEW_DrawItemPart(LISTVI +@@ -4688,7 +4707,12 @@ static void LISTVIEW_DrawItemPart(LISTVI if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) rcLabel.bottom--;
@@ -555,7 +555,7 @@ }
/*** -@@ -5212,7 +5236,11 @@ enddraw: +@@ -5232,7 +5256,11 @@ enddraw:
/* Draw marquee rectangle if appropriate */ if (infoPtr->bMarqueeSelect) @@ -567,7 +567,7 @@
if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); -@@ -8013,6 +8041,9 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW +@@ -8035,6 +8063,9 @@ static BOOL LISTVIEW_SetBkColor(LISTVIEW { TRACE("(color=%x)\n", color);
@@ -577,7 +577,7 @@ if(infoPtr->clrBk != color) { if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush); infoPtr->clrBk = color; -@@ -8688,7 +8719,7 @@ static DWORD LISTVIEW_SetIconSpacing(LIS +@@ -8710,7 +8741,7 @@ static DWORD LISTVIEW_SetIconSpacing(LIS return oldspacing; }
@@ -586,7 +586,7 @@ { INT cx, cy;
-@@ -8699,8 +8730,8 @@ static inline void set_icon_size(SIZE *s +@@ -8721,8 +8752,8 @@ static inline void set_icon_size(SIZE *s } else { @@ -597,7 +597,7 @@ } }
-@@ -9435,6 +9466,9 @@ static LRESULT LISTVIEW_NCCreate(HWND hw +@@ -9458,6 +9489,9 @@ static LRESULT LISTVIEW_NCCreate(HWND hw infoPtr->clrText = CLR_DEFAULT; infoPtr->clrTextBk = CLR_DEFAULT; LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow); @@ -607,7 +607,7 @@
/* set default values */ infoPtr->nFocusedItem = -1; -@@ -11718,6 +11752,14 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg +@@ -11741,6 +11775,14 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg
case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); @@ -622,9 +622,22 @@ return 0;
/* case WM_TIMER: */ +diff -pudN e:\wine\dlls\comctl32/monthcal.c e:\reactos\dll\win32\comctl32/monthcal.c +--- e:\wine\dlls\comctl32/monthcal.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/monthcal.c 2016-08-18 12:03:13 +0100 +@@ -43,6 +43,9 @@ + + WINE_DEFAULT_DEBUG_CHANNEL(monthcal); + ++/* FIXME: Inspect */ ++#define MCS_NOSELCHANGEONNAV 0x0100 ++ + #define MC_SEL_LBUTUP 1 /* Left button released */ + #define MC_SEL_LBUTDOWN 2 /* Left button pressed in calendar */ + #define MC_PREVPRESSED 4 /* Prev month button pressed */ diff -pudN e:\wine\dlls\comctl32/propsheet.c e:\reactos\dll\win32\comctl32/propsheet.c ---- e:\wine\dlls\comctl32/propsheet.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/propsheet.c 2016-06-05 19:39:01 +0100 +--- e:\wine\dlls\comctl32/propsheet.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/propsheet.c 2016-08-18 12:03:14 +0100 @@ -2355,12 +2355,19 @@ static void PROPSHEET_SetWizButtons(HWND HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON); BOOL enable_finish = ((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH); @@ -680,8 +693,8 @@
/****************************************************************************** diff -pudN e:\wine\dlls\comctl32/rebar.c e:\reactos\dll\win32\comctl32/rebar.c ---- e:\wine\dlls\comctl32/rebar.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/rebar.c 2016-06-05 19:39:01 +0100 +--- e:\wine\dlls\comctl32/rebar.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/rebar.c 2016-08-18 12:03:14 +0100 @@ -50,7 +50,6 @@ * - WM_QUERYNEWPALETTE * - WM_RBUTTONDOWN @@ -690,7 +703,7 @@ * - WM_VKEYTOITEM * - WM_WININICHANGE * Notifications: -@@ -1821,16 +1820,43 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1819,16 +1818,43 @@ static LRESULT REBAR_EraseBkGnd (const R RECT cr; COLORREF old = CLR_NONE, new; HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); @@ -734,7 +747,7 @@ /* draw band separator between rows */ if (lpBand->iRow != oldrow) { oldrow = lpBand->iRow; -@@ -1855,6 +1881,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1853,6 +1879,9 @@ static LRESULT REBAR_EraseBkGnd (const R } TRACE ("drawing band separator bottom (%s)\n", wine_dbgstr_rect(&rcRowSep)); @@ -744,7 +757,7 @@ } }
-@@ -1865,6 +1894,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1863,6 +1892,9 @@ static LRESULT REBAR_EraseBkGnd (const R if (infoPtr->dwStyle & CCS_VERT) { rcSep.bottom = rcSep.top; rcSep.top -= SEP_WIDTH_SIZE; @@ -754,7 +767,7 @@ if (theme) DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_BOTTOM, NULL); else -@@ -1873,6 +1905,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1871,6 +1903,9 @@ static LRESULT REBAR_EraseBkGnd (const R else { rcSep.right = rcSep.left; rcSep.left -= SEP_WIDTH_SIZE; @@ -764,7 +777,7 @@ if (theme) DrawThemeEdge (theme, hdc, RP_BAND, 0, &rcSep, EDGE_ETCHED, BF_RIGHT, NULL); else -@@ -1903,6 +1938,9 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1901,6 +1936,9 @@ static LRESULT REBAR_EraseBkGnd (const R #endif }
@@ -774,7 +787,7 @@ if (theme) { /* When themed, the background color is ignored (but not a -@@ -1910,6 +1948,7 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1908,6 +1946,7 @@ static LRESULT REBAR_EraseBkGnd (const R DrawThemeBackground (theme, hdc, 0, 0, &cr, &rcBand); } else @@ -782,7 +795,7 @@ { old = SetBkColor (hdc, new); TRACE("%s background color=0x%06x, band %s\n", -@@ -1920,7 +1959,26 @@ static LRESULT REBAR_EraseBkGnd (const R +@@ -1918,7 +1957,26 @@ static LRESULT REBAR_EraseBkGnd (const R if (lpBand->clrBack != CLR_NONE) SetBkColor (hdc, old); } @@ -792,7 +805,7 @@ + CombineRgn(hrgn, hrgn, hrgnBand, RGN_DIFF); + DeleteObject(hrgnBand); +#endif -+ } + } + +#if 1 +#ifdef __REACTOS__ @@ -804,12 +817,12 @@ + FillRgn(hdc, hrgn, hbrush); + DeleteObject(hbrush); + DeleteObject(hrgn); - } ++ } +#endif return TRUE; }
-@@ -2889,12 +2947,26 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT +@@ -2887,12 +2945,26 @@ REBAR_ShowBand (REBAR_INFO *infoPtr, INT
static LRESULT @@ -836,7 +849,7 @@ return TRUE; }
-@@ -3201,7 +3273,11 @@ REBAR_NCCalcSize (const REBAR_INFO *info +@@ -3199,7 +3271,11 @@ REBAR_NCCalcSize (const REBAR_INFO *info else if ((theme = GetWindowTheme (infoPtr->hwndSelf))) { /* FIXME: should use GetThemeInt */ @@ -848,7 +861,7 @@ } TRACE("new client=(%s)\n", wine_dbgstr_rect(rect)); return 0; -@@ -3302,7 +3365,11 @@ REBAR_NCHitTest (const REBAR_INFO *infoP +@@ -3300,7 +3376,11 @@ REBAR_NCHitTest (const REBAR_INFO *infoP (INT *)&nmmouse.dwItemSpec); nmmouse.dwItemData = 0; nmmouse.pt = clpt; @@ -860,7 +873,7 @@ if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST))) { TRACE("notify changed return value from %ld to %d\n", ret, i); -@@ -3374,6 +3441,9 @@ REBAR_Paint (const REBAR_INFO *infoPtr, +@@ -3372,6 +3452,9 @@ REBAR_Paint (const REBAR_INFO *infoPtr, { if (hdc) { TRACE("painting\n"); @@ -870,7 +883,7 @@ REBAR_Refresh (infoPtr, hdc); } else { PAINTSTRUCT ps; -@@ -3652,7 +3728,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, +@@ -3650,7 +3733,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, return REBAR_ShowBand (infoPtr, wParam, lParam);
case RB_SIZETORECT: @@ -882,7 +895,7 @@
/* Messages passed to parent */ -@@ -3735,6 +3815,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, +@@ -3733,6 +3820,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg,
case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); @@ -895,8 +908,8 @@
/* case WM_VKEYTOITEM: supported according to ControlSpy */ diff -pudN e:\wine\dlls\comctl32/toolbar.c e:\reactos\dll\win32\comctl32/toolbar.c ---- e:\wine\dlls\comctl32/toolbar.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/toolbar.c 2016-06-05 19:39:01 +0100 +--- e:\wine\dlls\comctl32/toolbar.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/toolbar.c 2016-08-18 12:03:14 +0100 @@ -33,11 +33,9 @@ * - TBSTYLE_REGISTERDROP * - TBSTYLE_EX_DOUBLEBUFFER @@ -1056,7 +1069,7 @@ }
/* get a pointer to the text */ -@@ -1028,7 +1092,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * +@@ -1027,7 +1091,11 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * } }
@@ -1068,7 +1081,7 @@ { int partId = drawSepDropDownArrow ? TP_SPLITBUTTON : TP_BUTTON; int stateId = TS_NORMAL; -@@ -1045,7 +1113,12 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO * +@@ -1044,7 +1112,12 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *
DrawThemeBackground (theme, hdc, partId, stateId, &rc, NULL); } @@ -1081,7 +1094,7 @@ TOOLBAR_DrawFrame(infoPtr, &tbcd, &rc, dwItemCDFlag);
if (drawSepDropDownArrow) -@@ -1571,9 +1644,14 @@ static inline SIZE TOOLBAR_MeasureButton +@@ -1570,9 +1643,14 @@ static inline SIZE TOOLBAR_MeasureButton /* ... add on the necessary padding */ if (bValidImageList) { @@ -1096,7 +1109,7 @@ sizeButton.cy += LISTPAD_CY; } else -@@ -1590,7 +1668,11 @@ static inline SIZE TOOLBAR_MeasureButton +@@ -1589,7 +1667,11 @@ static inline SIZE TOOLBAR_MeasureButton { if (bHasBitmap) { @@ -1108,7 +1121,7 @@ if (sizeString.cy > 0) sizeButton.cy += 1 + sizeString.cy; sizeButton.cx = infoPtr->szPadding.cx + -@@ -1695,7 +1777,14 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *info +@@ -1694,7 +1776,14 @@ TOOLBAR_LayoutToolbar(TOOLBAR_INFO *info { if (btnPtr->cx) cx = btnPtr->cx; @@ -1123,7 +1136,7 @@ { SIZE sz; HDC hdc; -@@ -1954,6 +2043,17 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND h +@@ -1953,6 +2042,17 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND h SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg); }
@@ -1141,7 +1154,7 @@ static void TOOLBAR_TooltipAddTool(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *button) { -@@ -3535,6 +3635,36 @@ TOOLBAR_GetMaxSize (const TOOLBAR_INFO * +@@ -3534,6 +3634,36 @@ TOOLBAR_GetMaxSize (const TOOLBAR_INFO * return TRUE; }
@@ -1178,7 +1191,7 @@
/* << TOOLBAR_GetObject >> */
-@@ -4790,6 +4920,44 @@ TOOLBAR_SetMaxTextRows (TOOLBAR_INFO *in +@@ -4789,6 +4919,44 @@ TOOLBAR_SetMaxTextRows (TOOLBAR_INFO *in return TRUE; }
@@ -1223,7 +1236,7 @@
/* MSDN gives slightly wrong info on padding. * 1. It is not only used on buttons with the BTNS_AUTOSIZE style -@@ -6030,6 +6198,10 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wPar +@@ -6029,6 +6197,10 @@ TOOLBAR_NCCreate (HWND hwnd, WPARAM wPar infoPtr->clrBtnShadow = CLR_DEFAULT; infoPtr->szPadding.cx = DEFPAD_CX; infoPtr->szPadding.cy = DEFPAD_CY; @@ -1234,7 +1247,7 @@ infoPtr->iListGap = DEFLISTGAP; infoPtr->iTopMargin = default_top_margin(infoPtr); infoPtr->dwStyle = lpcs->style; -@@ -6439,7 +6611,7 @@ TOOLBAR_SysColorChange (void) +@@ -6438,7 +6610,7 @@ TOOLBAR_SysColorChange (void) return 0; }
@@ -1243,7 +1256,7 @@ /* update theme after a WM_THEMECHANGED message */ static LRESULT theme_changed (HWND hwnd) { -@@ -6448,7 +6620,7 @@ static LRESULT theme_changed (HWND hwnd) +@@ -6447,7 +6619,7 @@ static LRESULT theme_changed (HWND hwnd) OpenThemeData (hwnd, themeClass); return 0; } @@ -1252,7 +1265,7 @@
static LRESULT WINAPI ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -@@ -6553,6 +6725,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, +@@ -6552,6 +6724,10 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg,
case TB_GETMAXSIZE: return TOOLBAR_GetMaxSize (infoPtr, (LPSIZE)lParam); @@ -1263,7 +1276,7 @@
/* case TB_GETOBJECT: */ /* 4.71 */
-@@ -6694,6 +6870,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, +@@ -6693,6 +6869,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, case TB_SETMAXTEXTROWS: return TOOLBAR_SetMaxTextRows (infoPtr, wParam);
@@ -1275,7 +1288,7 @@ case TB_SETPADDING: return TOOLBAR_SetPadding (infoPtr, lParam);
-@@ -6835,7 +7016,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, +@@ -6834,7 +7015,11 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, return TOOLBAR_SysColorChange ();
case WM_THEMECHANGED: @@ -1288,9 +1301,9 @@ /* case WM_WININICHANGE: */
diff -pudN e:\wine\dlls\comctl32/tooltips.c e:\reactos\dll\win32\comctl32/tooltips.c ---- e:\wine\dlls\comctl32/tooltips.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/tooltips.c 2016-06-05 19:39:01 +0100 -@@ -2013,7 +2013,36 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO +--- e:\wine\dlls\comctl32/tooltips.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/tooltips.c 2016-08-18 12:03:14 +0100 +@@ -2009,7 +2009,36 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO static LRESULT TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { @@ -1328,8 +1341,8 @@ return 0; } diff -pudN e:\wine\dlls\comctl32/treeview.c e:\reactos\dll\win32\comctl32/treeview.c ---- e:\wine\dlls\comctl32/treeview.c 2016-05-31 18:00:02 +0100 -+++ e:\reactos\dll\win32\comctl32/treeview.c 2016-03-01 20:00:54 +0100 +--- e:\wine\dlls\comctl32/treeview.c 2016-08-14 19:11:25 +0100 ++++ e:\reactos\dll\win32\comctl32/treeview.c 2016-08-18 12:03:14 +0100 @@ -2888,7 +2888,14 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, } }
Modified: trunk/reactos/dll/win32/comctl32/draglist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/draglist... ============================================================================== --- trunk/reactos/dll/win32/comctl32/draglist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/draglist.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -255,7 +255,7 @@ RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL, RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
- CopyRect(&data->last_drag_icon_rect, &rcDragIcon); + data->last_drag_icon_rect = rcDragIcon;
if (nItem >= 0) {
Modified: trunk/reactos/dll/win32/comctl32/dsa.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/dsa.c?re... ============================================================================== --- trunk/reactos/dll/win32/comctl32/dsa.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/dsa.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -259,6 +259,9 @@ nNewItems = hdsa->nMaxCount + hdsa->nGrow; nSize = hdsa->nItemSize * nNewItems;
+ if (nSize / hdsa->nItemSize != nNewItems) + return -1; + lpTemp = ReAlloc (hdsa->pData, nSize); if (!lpTemp) return -1;
Modified: trunk/reactos/dll/win32/comctl32/imagelist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imagelis... ============================================================================== --- trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -2254,7 +2254,7 @@
/* helper for ImageList_Read, see comments below */ -static void *read_bitmap(LPSTREAM pstm, BITMAPINFO *bmi) +static void *read_bitmap(IStream *pstm, BITMAPINFO *bmi) { BITMAPFILEHEADER bmfh; int bitsperpixel, palspace; @@ -2330,7 +2330,7 @@ * * BYTE maskbits[imagesize]; */ -HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm) +HIMAGELIST WINAPI ImageList_Read(IStream *pstm) { char image_buf[sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256]; char mask_buf[sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256]; @@ -3064,8 +3064,7 @@ /* helper for ImageList_Write - write bitmap to pstm * currently everything is written as 24 bit RGB, except masks */ -static BOOL -_write_bitmap(HBITMAP hBitmap, LPSTREAM pstm) +static BOOL _write_bitmap(HBITMAP hBitmap, IStream *pstm) { LPBITMAPFILEHEADER bmfh; LPBITMAPINFOHEADER bmih; @@ -3151,8 +3150,7 @@ * probably. */
-BOOL WINAPI -ImageList_Write (HIMAGELIST himl, LPSTREAM pstm) +BOOL WINAPI ImageList_Write(HIMAGELIST himl, IStream *pstm) { ILHEAD ilHead; int i; @@ -3558,7 +3556,9 @@ if (!ImageList_GetImageInfo(imgl, i, &info)) return E_FAIL;
- return CopyRect(prc, &info.rcImage) ? S_OK : E_FAIL; + *prc = info.rcImage; + + return S_OK; }
static HRESULT WINAPI ImageListImpl_GetIconSize(IImageList2 *iface, int *cx,
Modified: trunk/reactos/dll/win32/comctl32/listview.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listview... ============================================================================== --- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -572,23 +572,28 @@
if (pScrollInfo == NULL) return "(null)"; len = snprintf(buf, size, "{cbSize=%u, ", pScrollInfo->cbSize); - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (pScrollInfo->fMask & SIF_RANGE) len = snprintf(buf, size, "nMin=%d, nMax=%d, ", pScrollInfo->nMin, pScrollInfo->nMax); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (pScrollInfo->fMask & SIF_PAGE) len = snprintf(buf, size, "nPage=%u, ", pScrollInfo->nPage); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (pScrollInfo->fMask & SIF_POS) len = snprintf(buf, size, "nPos=%d, ", pScrollInfo->nPos); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (pScrollInfo->fMask & SIF_TRACKPOS) len = snprintf(buf, size, "nTrackPos=%d, ", pScrollInfo->nTrackPos); else len = 0; - if (len == -1) goto end; buf += len; + if (len == -1) goto end; + buf += len; goto undo; end: buf = text + strlen(text); @@ -613,27 +618,33 @@
if (lpLVItem == NULL) return "(null)"; len = snprintf(buf, size, "{iItem=%d, iSubItem=%d, ", lpLVItem->iItem, lpLVItem->iSubItem); - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpLVItem->mask & LVIF_STATE) len = snprintf(buf, size, "state=%x, stateMask=%x, ", lpLVItem->state, lpLVItem->stateMask); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpLVItem->mask & LVIF_TEXT) len = snprintf(buf, size, "pszText=%s, cchTextMax=%d, ", debugtext_tn(lpLVItem->pszText, isW, 80), lpLVItem->cchTextMax); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpLVItem->mask & LVIF_IMAGE) len = snprintf(buf, size, "iImage=%d, ", lpLVItem->iImage); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpLVItem->mask & LVIF_PARAM) len = snprintf(buf, size, "lParam=%lx, ", lpLVItem->lParam); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpLVItem->mask & LVIF_INDENT) len = snprintf(buf, size, "iIndent=%d, ", lpLVItem->iIndent); else len = 0; - if (len == -1) goto end; buf += len; + if (len == -1) goto end; + buf += len; goto undo; end: buf = text + strlen(text); @@ -649,31 +660,38 @@
if (lpColumn == NULL) return "(null)"; len = snprintf(buf, size, "{"); - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpColumn->mask & LVCF_SUBITEM) len = snprintf(buf, size, "iSubItem=%d, ", lpColumn->iSubItem); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpColumn->mask & LVCF_FMT) len = snprintf(buf, size, "fmt=%x, ", lpColumn->fmt); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpColumn->mask & LVCF_WIDTH) len = snprintf(buf, size, "cx=%d, ", lpColumn->cx); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpColumn->mask & LVCF_TEXT) len = snprintf(buf, size, "pszText=%s, cchTextMax=%d, ", debugtext_tn(lpColumn->pszText, isW, 80), lpColumn->cchTextMax); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpColumn->mask & LVCF_IMAGE) len = snprintf(buf, size, "iImage=%d, ", lpColumn->iImage); else len = 0; - if (len == -1) goto end; buf += len; size -= len; + if (len == -1) goto end; + buf += len; size -= len; if (lpColumn->mask & LVCF_ORDER) len = snprintf(buf, size, "iOrder=%d, ", lpColumn->iOrder); else len = 0; - if (len == -1) goto end; buf += len; + if (len == -1) goto end; + buf += len; goto undo; end: buf = text + strlen(text); @@ -3856,9 +3874,8 @@
iterator_frameditems_absolute(&old_elems, infoPtr, &infoPtr->marqueeRect);
- CopyRect(&infoPtr->marqueeRect, &rect); - - CopyRect(&infoPtr->marqueeDrawRect, &rect); + infoPtr->marqueeRect = rect; + infoPtr->marqueeDrawRect = rect; OffsetRect(&infoPtr->marqueeDrawRect, offset->x, offset->y);
iterator_frameditems_absolute(&new_elems, infoPtr, &infoPtr->marqueeRect); @@ -5629,8 +5646,8 @@
TRACE("nColumn=%d\n", nColumn);
- if (nColumn < 0 || DPA_GetPtrCount(infoPtr->hdpaColumns) == 0 - || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; + if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) + return FALSE;
/* While the MSDN specifically says that column zero should not be deleted, what actually happens is that the column itself is deleted but no items or subitems @@ -5871,13 +5888,15 @@ { DWORD len = isW ? GetWindowTextLengthW(infoPtr->hwndEdit) : GetWindowTextLengthA(infoPtr->hwndEdit);
- if (len) + if (len++) { - if ((pszText = Alloc((len+1) * (isW ? sizeof(WCHAR) : sizeof(CHAR))))) - { - if (isW) GetWindowTextW(infoPtr->hwndEdit, pszText, len+1); - else GetWindowTextA(infoPtr->hwndEdit, (CHAR*)pszText, len+1); - } + if (!(pszText = Alloc(len * (isW ? sizeof(WCHAR) : sizeof(CHAR))))) + return FALSE; + + if (isW) + GetWindowTextW(infoPtr->hwndEdit, pszText, len); + else + GetWindowTextA(infoPtr->hwndEdit, (CHAR*)pszText, len); } }
@@ -9064,7 +9083,8 @@
TRACE("(nIndex=%d)\n", nIndex);
- infoPtr->nSelectionMark = nIndex; + if (nIndex >= -1 && nIndex < infoPtr->nItemCount) + infoPtr->nSelectionMark = nIndex;
return nOldIndex; }
Modified: trunk/reactos/dll/win32/comctl32/monthcal.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthcal... ============================================================================== --- trunk/reactos/dll/win32/comctl32/monthcal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/monthcal.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -42,6 +42,9 @@ #include "comctl32.h"
WINE_DEFAULT_DEBUG_CHANNEL(monthcal); + +/* FIXME: Inspect */ +#define MCS_NOSELCHANGEONNAV 0x0100
#define MC_SEL_LBUTUP 1 /* Left button released */ #define MC_SEL_LBUTDOWN 2 /* Left button pressed in calendar */ @@ -1953,7 +1956,7 @@ }
/* no valid range check performed */ -static void MONTHCAL_Scroll(MONTHCAL_INFO *infoPtr, INT delta) +static void MONTHCAL_Scroll(MONTHCAL_INFO *infoPtr, INT delta, BOOL keep_selection) { INT i, selIdx = -1;
@@ -1966,8 +1969,11 @@ MONTHCAL_GetMonth(&infoPtr->calendars[i].month, delta); }
+ if (keep_selection) + return; + /* selection is always shifted to first calendar */ - if(infoPtr->dwStyle & MCS_MULTISELECT) + if (infoPtr->dwStyle & MCS_MULTISELECT) { SYSTEMTIME range[2];
@@ -1988,6 +1994,7 @@ static void MONTHCAL_GoToMonth(MONTHCAL_INFO *infoPtr, enum nav_direction direction) { INT delta = infoPtr->delta ? infoPtr->delta : MONTHCAL_GetCalCount(infoPtr); + BOOL keep_selection; SYSTEMTIME st;
TRACE("%s\n", direction == DIRECTION_BACKWARD ? "back" : "fwd"); @@ -2006,9 +2013,11 @@
if(!MONTHCAL_IsDateInValidRange(infoPtr, &st, FALSE)) return;
- MONTHCAL_Scroll(infoPtr, direction == DIRECTION_BACKWARD ? -delta : delta); + keep_selection = infoPtr->dwStyle & MCS_NOSELCHANGEONNAV; + MONTHCAL_Scroll(infoPtr, direction == DIRECTION_BACKWARD ? -delta : delta, keep_selection); MONTHCAL_NotifyDayState(infoPtr); - MONTHCAL_NotifySelectionChange(infoPtr); + if (!keep_selection) + MONTHCAL_NotifySelectionChange(infoPtr); }
static LRESULT @@ -2196,7 +2205,7 @@
if (MONTHCAL_IsDateInValidRange(infoPtr, &st, FALSE)) { - MONTHCAL_Scroll(infoPtr, delta); + MONTHCAL_Scroll(infoPtr, delta, FALSE); MONTHCAL_NotifyDayState(infoPtr); MONTHCAL_NotifySelectionChange(infoPtr); InvalidateRect(infoPtr->hwndSelf, NULL, FALSE); @@ -2835,7 +2844,7 @@ if (hdr->hwndFrom == infoPtr->hWndYearUpDown && nmud->iDelta) { /* year value limits are set up explicitly after updown creation */ - MONTHCAL_Scroll(infoPtr, 12 * nmud->iDelta); + MONTHCAL_Scroll(infoPtr, 12 * nmud->iDelta, FALSE); MONTHCAL_NotifyDayState(infoPtr); MONTHCAL_NotifySelectionChange(infoPtr); }
Modified: trunk/reactos/dll/win32/comctl32/progress.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/progress... ============================================================================== --- trunk/reactos/dll/win32/comctl32/progress.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/progress.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -344,7 +344,7 @@ DrawThemeParentBackground (infoPtr->Self, hdc, NULL); DrawThemeBackground (pdi.theme, hdc, part, 0, &pdi.rect, NULL); SelectClipRgn (hdc, NULL); - CopyRect (&pdi.rect, &cntRect); + pdi.rect = cntRect; }
/* compute some drawing parameters */
Modified: trunk/reactos/dll/win32/comctl32/propsheet.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propshee... ============================================================================== --- trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -3268,7 +3268,7 @@ if (bm.bmWidth < r.right || bm.bmHeight < r.bottom) { hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0)); - CopyRect(&r, &rzone); + r = rzone; if (bm.bmWidth < r.right) { r.left = bm.bmWidth;
Modified: trunk/reactos/dll/win32/comctl32/rebar.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c?... ============================================================================== --- trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -714,8 +714,7 @@ lpBand->fDraw |= DRAW_GRIPPER; lpBand->rcGripper.left += REBAR_PRE_GRIPPER; lpBand->rcGripper.right = lpBand->rcGripper.left + GRIPPER_WIDTH; - lpBand->rcGripper.top += 2; - lpBand->rcGripper.bottom -= 2; + InflateRect(&lpBand->rcGripper, 0, -2);
SetRect (&lpBand->rcCapImage, lpBand->rcGripper.right+REBAR_ALWAYS_SPACE, lpBand->rcBand.top, @@ -843,8 +842,7 @@ } else { /* horizontal gripper */ - lpBand->rcGripper.left += 2; - lpBand->rcGripper.right -= 2; + InflateRect(&lpBand->rcGripper, -2, 0); lpBand->rcGripper.top += REBAR_PRE_GRIPPER; lpBand->rcGripper.bottom = lpBand->rcGripper.top + GRIPPER_WIDTH;
@@ -1557,7 +1555,7 @@ GetClientRect(infoPtr->hwndSelf, &rcNew);
GetClientRect(infoPtr->hwndSelf, &autosize.rcTarget); - autosize.fChanged = (memcmp(&rc, &rcNew, sizeof(RECT)) == 0); + autosize.fChanged = EqualRect(&rc, &rcNew); autosize.rcTarget = rc; autosize.rcActual = rcNew; REBAR_Notify((NMHDR *)&autosize, infoPtr, RBN_AUTOSIZE); @@ -2434,7 +2432,7 @@
lpBand = REBAR_GetBand(infoPtr, iBand); /* For CCS_VERT the coordinates will be swapped - like on Windows */ - CopyRect (lprc, &lpBand->rcBand); + *lprc = lpBand->rcBand;
TRACE("band %d, (%s)\n", iBand, wine_dbgstr_rect(lprc));
Modified: trunk/reactos/dll/win32/comctl32/status.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/status.c... ============================================================================== --- trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -114,8 +114,8 @@ * textHeight pixels large */ HDC hdc = GetDC(infoPtr->Self); RECT r; - memset (&r, 0, sizeof (r)); - r.bottom = max(infoPtr->minHeight, tm.tmHeight); + + SetRect(&r, 0, 0, 0, max(infoPtr->minHeight, tm.tmHeight)); if (SUCCEEDED(GetThemeBackgroundExtent(theme, hdc, SP_PANE, 0, &r, &r))) { height = r.bottom - r.top;
Modified: trunk/reactos/dll/win32/comctl32/tab.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?re... ============================================================================== --- trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -357,14 +357,8 @@ (itemIndex < infoPtr->leftmostVisible))) { TRACE("Not Visible\n"); - /* need to initialize these to empty rects */ - if (itemRect) - { - memset(itemRect,0,sizeof(RECT)); - itemRect->bottom = infoPtr->tabHeight; - } - if (selectedRect) - memset(selectedRect,0,sizeof(RECT)); + SetRect(itemRect, 0, 0, 0, infoPtr->tabHeight); + SetRectEmpty(selectedRect); return FALSE; }
@@ -444,7 +438,7 @@ /* Now, calculate the position of the item as if it were selected. */ if (selectedRect!=NULL) { - CopyRect(selectedRect, itemRect); + *selectedRect = *itemRect;
/* The rectangle of a selected item is a bit wider. */ if(infoPtr->dwStyle & TCS_VERTICAL) @@ -1595,12 +1589,7 @@ } } else - { - drawRect->left += 2; - drawRect->top += 2; - drawRect->right -= 2; - drawRect->bottom -= 2; - } + InflateRect(drawRect, -2, -2); } else { @@ -1609,8 +1598,7 @@ if (iItem != infoPtr->iSelected) { drawRect->left += 2; - drawRect->top += 2; - drawRect->bottom -= 2; + InflateRect(drawRect, 0, -2); } } else if (infoPtr->dwStyle & TCS_VERTICAL) @@ -1621,9 +1609,8 @@ } else { - drawRect->top += 2; drawRect->right -= 2; - drawRect->bottom -= 2; + InflateRect(drawRect, 0, -2); } } else if (infoPtr->dwStyle & TCS_BOTTOM) @@ -1706,10 +1693,7 @@ drawRect->top += 2; drawRect->right -= 1; if ( iItem == infoPtr->iSelected ) - { - drawRect->right -= 1; - drawRect->left += 1; - } + InflateRect(drawRect, -1, 0);
id = (UINT)GetWindowLongPtrW( infoPtr->hwnd, GWLP_ID );
@@ -1725,7 +1709,7 @@ dis.itemState |= ODS_FOCUS; dis.hwndItem = infoPtr->hwnd; dis.hDC = hdc; - CopyRect(&dis.rcItem,drawRect); + dis.rcItem = *drawRect;
/* when extra data fits ULONG_PTR, store it directly */ if (infoPtr->cbInfo > sizeof(LPARAM))
Modified: trunk/reactos/dll/win32/comctl32/theme_button.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_bu... ============================================================================== --- trunk/reactos/dll/win32/comctl32/theme_button.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/theme_button.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -265,8 +265,7 @@
if (text) { - textRect.left += 2; - textRect.right -= 2; + InflateRect(&textRect, -2, 0); DrawThemeText(theme, hDC, BP_GROUPBOX, state, text, lstrlenW(text), 0, 0, &textRect); HeapFree(GetProcessHeap(), 0, text); }
Modified: trunk/reactos/dll/win32/comctl32/theme_combo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theme_co... ============================================================================== --- trunk/reactos/dll/win32/comctl32/theme_combo.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/theme_combo.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -69,7 +69,7 @@ /* * Give ourselves some space. */ - CopyRect (&rectEdit, &cbi->rcItem); + rectEdit = cbi->rcItem; InflateRect( &rectEdit, -1, -1 );
if(dwStyle & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) @@ -176,8 +176,7 @@ GetClientRect (hwnd, &frameRect); else { - CopyRect (&frameRect, &cbi.rcItem); - + frameRect = cbi.rcItem; InflateRect(&frameRect, EDIT_CONTROL_PADDING + COMBO_XBORDERSIZE, EDIT_CONTROL_PADDING + COMBO_YBORDERSIZE);
Modified: trunk/reactos/dll/win32/comctl32/toolbar.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar.... ============================================================================== --- trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -925,7 +925,7 @@ HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
rc = btnPtr->rect; - CopyRect (&rcArrow, &rc); + rcArrow = rc;
/* separator - doesn't send NM_CUSTOMDRAW */ if (btnPtr->fsStyle & BTNS_SEP) { @@ -979,8 +979,8 @@ /* copy text & bitmap rects after adjusting for drop-down arrow * so that text & bitmap is centered in the rectangle not containing * the arrow */ - CopyRect(&rcText, &rc); - CopyRect(&rcBitmap, &rc); + rcText = rc; + rcBitmap = rc;
/* Center the bitmap horizontally and vertically */ if (dwStyle & TBSTYLE_LIST) @@ -1007,8 +1007,7 @@ /* calculate text position */ if (lpText) { - rcText.left += GetSystemMetrics(SM_CXEDGE); - rcText.right -= GetSystemMetrics(SM_CXEDGE); + InflateRect(&rcText, -GetSystemMetrics(SM_CXEDGE), 0); if (dwStyle & TBSTYLE_LIST) { rcText.left += infoPtr->nBitmapWidth + infoPtr->iListGap + 2; @@ -2734,9 +2733,9 @@ lpdis->rcItem.right, lpdis->rcItem.bottom);
/* calculate button and text rectangles */ - CopyRect (&rcButton, &lpdis->rcItem); + rcButton = lpdis->rcItem; InflateRect (&rcButton, -1, -1); - CopyRect (&rcText, &rcButton); + rcText = rcButton; rcButton.right = rcButton.left + custInfo->tbInfo->nBitmapWidth + 6; rcText.left = rcButton.right + 2;
@@ -5704,7 +5703,7 @@ RECT arrowRect; infoPtr->nOldHit = nHit;
- CopyRect(&arrowRect, &btnPtr->rect); + arrowRect = btnPtr->rect; arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH);
/* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */
Modified: trunk/reactos/dll/win32/comctl32/tooltips.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltips... ============================================================================== --- trunk/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -1321,12 +1321,10 @@
static LRESULT -TOOLTIPS_GetMargin (const TOOLTIPS_INFO *infoPtr, LPRECT lpRect) -{ - lpRect->left = infoPtr->rcMargin.left; - lpRect->right = infoPtr->rcMargin.right; - lpRect->bottom = infoPtr->rcMargin.bottom; - lpRect->top = infoPtr->rcMargin.top; +TOOLTIPS_GetMargin (const TOOLTIPS_INFO *infoPtr, RECT *rect) +{ + if (rect) + *rect = infoPtr->rcMargin;
return 0; } @@ -1598,12 +1596,10 @@
static LRESULT -TOOLTIPS_SetMargin (TOOLTIPS_INFO *infoPtr, const RECT *lpRect) -{ - infoPtr->rcMargin.left = lpRect->left; - infoPtr->rcMargin.right = lpRect->right; - infoPtr->rcMargin.bottom = lpRect->bottom; - infoPtr->rcMargin.top = lpRect->top; +TOOLTIPS_SetMargin (TOOLTIPS_INFO *infoPtr, const RECT *rect) +{ + if (rect) + infoPtr->rcMargin = *rect;
return 0; }
Modified: trunk/reactos/dll/win32/comctl32/trackbar.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/trackbar... ============================================================================== --- trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/trackbar.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -32,6 +32,8 @@
#include "comctl32.h"
+#include <math.h> + WINE_DEFAULT_DEBUG_CHANNEL(trackbar);
typedef struct @@ -188,7 +190,7 @@ pos = infoPtr->lRangeMin;
TRACE("%.2f\n", pos); - return (LONG)(pos + 0.5); + return (LONG)floor(pos + 0.5); }
@@ -936,8 +938,11 @@ if (GetWindowTheme (infoPtr->hwndSelf)) { DrawThemeParentBackground (infoPtr->hwndSelf, hdc, 0); } - else - FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE)); + else { + HBRUSH brush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLORSTATIC, + (WPARAM)hdc, (LPARAM)infoPtr->hwndSelf); + FillRect (hdc, &rcClient, brush ? brush : GetSysColorBrush(COLOR_BTNFACE)); + } if (gcdrf != CDRF_DODEFAULT) notify_customdraw(infoPtr, &nmcd, CDDS_POSTERASE); } @@ -1230,21 +1235,21 @@ infoPtr->lRangeMin = (SHORT)LOWORD(range); infoPtr->lRangeMax = (SHORT)HIWORD(range);
- if (infoPtr->lPos < infoPtr->lRangeMin) { + /* clip position to new min/max limit */ + if (infoPtr->lPos < infoPtr->lRangeMin) infoPtr->lPos = infoPtr->lRangeMin; - infoPtr->flags |= TB_THUMBPOSCHANGED; - } - - if (infoPtr->lPos > infoPtr->lRangeMax) { + + if (infoPtr->lPos > infoPtr->lRangeMax) infoPtr->lPos = infoPtr->lRangeMax; - infoPtr->flags |= TB_THUMBPOSCHANGED; - }
infoPtr->lPageSize = (infoPtr->lRangeMax - infoPtr->lRangeMin) / 5; if (infoPtr->lPageSize == 0) infoPtr->lPageSize = 1;
- if (changed && (infoPtr->dwStyle & TBS_AUTOTICKS)) - TRACKBAR_RecalculateTics (infoPtr); + if (changed) { + if (infoPtr->dwStyle & TBS_AUTOTICKS) + TRACKBAR_RecalculateTics (infoPtr); + infoPtr->flags |= TB_THUMBPOSCHANGED; + }
if (redraw) TRACKBAR_InvalidateAll(infoPtr);
Modified: trunk/reactos/dll/win32/comctl32/treeview.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treeview... ============================================================================== --- trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -3621,7 +3621,7 @@ return item; }
-static LRESULT +static TREEVIEW_ITEM * TREEVIEW_HitTest(const TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht) { TREEVIEW_ITEM *item; @@ -3656,14 +3656,14 @@ if (status) { lpht->flags = status; - return 0; + return NULL; }
item = TREEVIEW_HitTestPoint(infoPtr, lpht->pt); if (!item) { lpht->flags = TVHT_NOWHERE; - return 0; + return NULL; }
if (x >= item->textOffset + item->textWidth) @@ -3694,7 +3694,7 @@ lpht->hItem = item; TRACE("(%d,%d):result 0x%x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
- return (LRESULT)item; + return item; }
/* Item Label Editing ***************************************************/ @@ -4117,7 +4117,7 @@ hit.pt.x = (short)LOWORD(lParam); hit.pt.y = (short)HIWORD(lParam);
- item = (TREEVIEW_ITEM *)TREEVIEW_HitTest(infoPtr, &hit); + item = TREEVIEW_HitTest(infoPtr, &hit); if (!item) return 0; TRACE("item %d\n", TREEVIEW_GetItemIndex(infoPtr, item)); @@ -5317,9 +5317,9 @@ static LRESULT TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam) { - POINT pt; TRACKMOUSEEVENT trackinfo; TREEVIEW_ITEM * item; + TVHITTESTINFO ht;
if (!(infoPtr->dwStyle & TVS_TRACKSELECT)) return 0;
@@ -5344,18 +5344,21 @@ _TrackMouseEvent(&trackinfo); }
- pt.x = (short)LOWORD(lParam); - pt.y = (short)HIWORD(lParam); - - item = TREEVIEW_HitTestPoint(infoPtr, pt); - - if (item != infoPtr->hotItem) + ht.pt.x = (short)LOWORD(lParam); + ht.pt.y = (short)HIWORD(lParam); + + item = TREEVIEW_HitTest(infoPtr, &ht); + if ((item != infoPtr->hotItem) || !(ht.flags & TVHT_ONITEM)) { /* redraw old hot item */ TREEVIEW_InvalidateItem(infoPtr, infoPtr->hotItem); - infoPtr->hotItem = item; - /* redraw new hot item */ - TREEVIEW_InvalidateItem(infoPtr, infoPtr->hotItem); + infoPtr->hotItem = NULL; + if (item && (ht.flags & TVHT_ONITEM)) + { + infoPtr->hotItem = item; + /* redraw new hot item */ + TREEVIEW_InvalidateItem(infoPtr, infoPtr->hotItem); + } }
return 0; @@ -5494,14 +5497,14 @@ static LRESULT TREEVIEW_SetCursor(const TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { - POINT pt; TREEVIEW_ITEM * item; + TVHITTESTINFO ht; NMMOUSE nmmouse;
- GetCursorPos(&pt); - ScreenToClient(infoPtr->hwnd, &pt); - - item = TREEVIEW_HitTestPoint(infoPtr, pt); + GetCursorPos(&ht.pt); + ScreenToClient(infoPtr->hwnd, &ht.pt); + + item = TREEVIEW_HitTest(infoPtr, &ht);
memset(&nmmouse, 0, sizeof(nmmouse)); if (item) @@ -5515,7 +5518,7 @@ if (TREEVIEW_SendRealNotify(infoPtr, NM_SETCURSOR, &nmmouse.hdr)) return 0;
- if (item && (infoPtr->dwStyle & TVS_TRACKSELECT)) + if (item && (infoPtr->dwStyle & TVS_TRACKSELECT) && (ht.flags & TVHT_ONITEM)) { SetCursor(infoPtr->hcurHand); return 0; @@ -5659,7 +5662,7 @@ return TREEVIEW_GetVisibleCount(infoPtr);
case TVM_HITTEST: - return TREEVIEW_HitTest(infoPtr, (LPTVHITTESTINFO)lParam); + return (LRESULT)TREEVIEW_HitTest(infoPtr, (TVHITTESTINFO*)lParam);
case TVM_INSERTITEMA: case TVM_INSERTITEMW: @@ -5735,6 +5738,7 @@ return TREEVIEW_HScroll(infoPtr, wParam);
case WM_KEYDOWN: + case WM_SYSKEYDOWN: return TREEVIEW_KeyDown(infoPtr, wParam);
case WM_KILLFOCUS: @@ -5798,8 +5802,6 @@ case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); return 0; - - /* WM_SYSKEYDOWN */
case WM_TIMER: return TREEVIEW_HandleTimer(infoPtr, wParam);
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Aug 18 11:09:45 2016 @@ -54,7 +54,7 @@ reactos/dll/win32/cabinet # Synced to WineStaging-1.9.16 reactos/dll/win32/clusapi # Synced to WineStaging-1.9.11 reactos/dll/win32/comcat # Synced to WineStaging-1.9.11 -reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.11 +reactos/dll/win32/comctl32 # Synced to WineStaging-1.9.16 reactos/dll/win32/comdlg32 # Synced to WineStaging-1.9.11 reactos/dll/win32/compstui # Synced to WineStaging-1.9.11 reactos/dll/win32/credui # Synced to WineStaging-1.9.16