Author: winesync
Date: Wed Dec 12 11:52:08 2007
New Revision: 31178
URL:
http://svn.reactos.org/svn/reactos?rev=31178&view=rev
Log:
Autosyncing with Wine HEAD
Modified:
trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
trunk/reactos/dll/win32/comctl32/comctl32undoc.c
trunk/reactos/dll/win32/comctl32/commctrl.c
trunk/reactos/dll/win32/comctl32/dpa.c
trunk/reactos/dll/win32/comctl32/dsa.c
trunk/reactos/dll/win32/comctl32/header.c
trunk/reactos/dll/win32/comctl32/listview.c
trunk/reactos/dll/win32/comctl32/monthcal.c
trunk/reactos/dll/win32/comctl32/propsheet.c
trunk/reactos/dll/win32/comctl32/rebar.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
Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff Wed Dec 12 11:52:08 2007
@@ -82,15 +82,6 @@
}
/******************************************************************************
-@@ -3521,6 +3525,8 @@
- * from which to switch to the next page */
- SendMessageW(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0);
-
-+ PROPSHEET_UnChanged(hwnd, (HWND)wParam);
-+
- return TRUE;
- }
-
Index: tooltips.c
===================================================================
--- tooltips.c (revision 25790)
@@ -143,54 +134,3 @@
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
infoPtr->cdmode =
TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);
-@@ -4160,6 +4158,22 @@
- static LRESULT
- TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
- {
-+ TVHITTESTINFO ht;
-+
-+ ht.pt = *pPt;
-+
-+ TREEVIEW_HitTest(infoPtr, &ht);
-+
-+ if (ht.hItem)
-+ {
-+ /* Change to screen coordinate for WM_CONTEXTMENU */
-+ ClientToScreen(infoPtr->hwnd, &ht.pt);
-+
-+ /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
-+ SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
-+ (WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
-+ }
-+
- return 0;
- }
-
-Index: monthcal.c
-===================================================================
---- monthcal.c (revision 29360)
-+++ monthcal.c (working copy)
-@@ -1719,11 +1719,12 @@
-
-
- static LRESULT
--MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr)
-+MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr, HWND hFocusWnd)
- {
- TRACE("\n");
-
-- InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
-+ if (infoPtr->hwndNotify != hFocusWnd)
-+ ShowWindow(infoPtr->hwndSelf, SW_HIDE);
-
- return 0;
- }
-@@ -2031,7 +2032,7 @@
- return DLGC_WANTARROWS | DLGC_WANTCHARS;
-
- case WM_KILLFOCUS:
-- return MONTHCAL_KillFocus(infoPtr);
-+ return MONTHCAL_KillFocus(infoPtr, wParam);
-
- case WM_RBUTTONDOWN:
- return MONTHCAL_RButtonDown(infoPtr, lParam);
Modified: trunk/reactos/dll/win32/comctl32/comctl32undoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32undoc.c (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32undoc.c Wed Dec 12 11:52:08 2007
@@ -834,8 +834,8 @@
const WINEMRUITEM *witem;
INT desired, datasize;
+ if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
if (nItemPos >= mp->cursize) return -1;
- if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
desired = mp->realMRU[nItemPos];
desired -= 'a';
TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);
@@ -860,8 +860,8 @@
INT desired, datasize;
DWORD lenA;
+ if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
if (nItemPos >= mp->cursize) return -1;
- if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
desired = mp->realMRU[nItemPos];
desired -= 'a';
TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);
Modified: trunk/reactos/dll/win32/comctl32/commctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/commctr…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/commctrl.c (original)
+++ trunk/reactos/dll/win32/comctl32/commctrl.c Wed Dec 12 11:52:08 2007
@@ -343,7 +343,7 @@
else {
/* menu item was selected */
if (HIWORD(wParam) & MF_POPUP)
- uMenuID = (UINT)*(lpwIDs+1);
+ uMenuID = *(lpwIDs+1);
else
uMenuID = (UINT)LOWORD(wParam);
TRACE("uMenuID = %u\n", uMenuID);
Modified: trunk/reactos/dll/win32/comctl32/dpa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/dpa.c?r…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/dpa.c (original)
+++ trunk/reactos/dll/win32/comctl32/dpa.c Wed Dec 12 11:52:08 2007
@@ -443,7 +443,7 @@
/* create a new pointer array */
nNewItems = hdpaTemp->nGrow *
- ((INT)((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1);
+ (((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1);
nSize = nNewItems * sizeof(LPVOID);
hdpaTemp->ptrs = HeapAlloc (hdpaTemp->hHeap, HEAP_ZERO_MEMORY, nSize);
hdpaTemp->nMaxCount = nNewItems;
@@ -583,7 +583,7 @@
if (hdpa->nMaxCount <= i) {
/* resize the block of memory */
INT nNewItems =
- hdpa->nGrow * ((INT)(((i+1) - 1) / hdpa->nGrow) + 1);
+ hdpa->nGrow * ((((i+1) - 1) / hdpa->nGrow) + 1);
INT nSize = nNewItems * sizeof(LPVOID);
if (hdpa->ptrs)
@@ -654,7 +654,7 @@
return NULL;
hdpa->nMaxCount = nNewItems;
- hdpa->ptrs = (LPVOID*)lpDest;
+ hdpa->ptrs = lpDest;
}
return lpTemp;
Modified: trunk/reactos/dll/win32/comctl32/dsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/dsa.c?r…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/dsa.c (original)
+++ trunk/reactos/dll/win32/comctl32/dsa.c Wed Dec 12 11:52:08 2007
@@ -211,7 +211,7 @@
else {
/* resize the block of memory */
nNewItems =
- hdsa->nGrow * ((INT)(((nIndex + 1) - 1) / hdsa->nGrow) + 1);
+ hdsa->nGrow * ((((nIndex + 1) - 1) / hdsa->nGrow) + 1);
nSize = hdsa->nItemSize * nNewItems;
lpTemp = ReAlloc (hdsa->pData, nSize);
Modified: trunk/reactos/dll/win32/comctl32/header.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/header.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/header.c (original)
+++ trunk/reactos/dll/win32/comctl32/header.c Wed Dec 12 11:52:08 2007
@@ -981,7 +981,7 @@
int height, width;
HFONT hFont;
- if (wParam < 0 || wParam >= infoPtr->uNumItem)
+ if (wParam >= infoPtr->uNumItem)
return FALSE;
if (!infoPtr->bRectsValid)
Modified: trunk/reactos/dll/win32/comctl32/listview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/listview.c (original)
+++ trunk/reactos/dll/win32/comctl32/listview.c Wed Dec 12 11:52:08 2007
@@ -944,7 +944,7 @@
return result;
}
-static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW
*lpnmlvcd)
+static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW
*lpnmlvcd, BOOL SubItem)
{
if (lpnmlvcd->clrTextBk == CLR_DEFAULT)
lpnmlvcd->clrTextBk = comctl32_color.clrWindow;
@@ -952,18 +952,21 @@
lpnmlvcd->clrText = comctl32_color.clrWindowText;
/* apprently, for selected items, we have to override the returned values */
- if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED)
- {
- if (infoPtr->bFocus)
- {
- lpnmlvcd->clrTextBk = comctl32_color.clrHighlight;
- lpnmlvcd->clrText = comctl32_color.clrHighlightText;
+ if (!SubItem)
+ {
+ if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED)
+ {
+ if (infoPtr->bFocus)
+ {
+ lpnmlvcd->clrTextBk = comctl32_color.clrHighlight;
+ lpnmlvcd->clrText = comctl32_color.clrHighlightText;
+ }
+ else if (infoPtr->dwStyle & LVS_SHOWSELALWAYS)
+ {
+ lpnmlvcd->clrTextBk = comctl32_color.clr3dFace;
+ lpnmlvcd->clrText = comctl32_color.clrBtnText;
+ }
}
- else if (infoPtr->dwStyle & LVS_SHOWSELALWAYS)
- {
- lpnmlvcd->clrTextBk = comctl32_color.clr3dFace;
- lpnmlvcd->clrText = comctl32_color.clrBtnText;
- }
}
/* Set the text attributes */
@@ -3787,7 +3790,9 @@
if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint;
}
if (nSubItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW))
- prepaint_setup(infoPtr, hdc, &nmlvcd);
+ prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
+ else if ((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) == FALSE)
+ prepaint_setup(infoPtr, hdc, &nmlvcd, TRUE);
/* in full row select, subitems, will just use main item's colors */
if (nSubItem && uView == LVS_REPORT && (infoPtr->dwLvExStyle &
LVS_EX_FULLROWSELECT))
@@ -3930,7 +3935,7 @@
if (!(cditemmode & CDRF_SKIPDEFAULT))
{
- prepaint_setup (infoPtr, hdc, &nmlvcd);
+ prepaint_setup (infoPtr, hdc, &nmlvcd, FALSE);
SendMessageW(infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis);
}
@@ -4118,7 +4123,7 @@
customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0);
cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd);
if (cdmode & CDRF_SKIPDEFAULT) goto enddraw;
- prepaint_setup(infoPtr, hdc, &nmlvcd);
+ prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
/* Use these colors to draw the items */
infoPtr->clrTextBk = nmlvcd.clrTextBk;
@@ -5040,12 +5045,12 @@
BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL);
LVFINDINFOW fiw;
INT res;
- LPWSTR strW;
+ LPWSTR strW = NULL;
memcpy(&fiw, lpFindInfo, sizeof(fiw));
if (hasText) fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw);
- if (hasText) textfreeT(strW, FALSE);
+ textfreeT(strW, FALSE);
return res;
}
Modified: trunk/reactos/dll/win32/comctl32/monthcal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthca…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/monthcal.c (original)
+++ trunk/reactos/dll/win32/comctl32/monthcal.c Wed Dec 12 11:52:08 2007
@@ -1725,6 +1725,8 @@
if (infoPtr->hwndNotify != hFocusWnd)
ShowWindow(infoPtr->hwndSelf, SW_HIDE);
+ else
+ InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
return 0;
}
@@ -2032,7 +2034,7 @@
return DLGC_WANTARROWS | DLGC_WANTCHARS;
case WM_KILLFOCUS:
- return MONTHCAL_KillFocus(infoPtr, wParam);
+ return MONTHCAL_KillFocus(infoPtr, (HWND)wParam);
case WM_RBUTTONDOWN:
return MONTHCAL_RButtonDown(infoPtr, lParam);
Modified: trunk/reactos/dll/win32/comctl32/propsheet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propshe…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/propsheet.c (original)
+++ trunk/reactos/dll/win32/comctl32/propsheet.c Wed Dec 12 11:52:08 2007
@@ -1527,7 +1527,7 @@
if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) &&
!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK))
{
- ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark =
+ psInfo->ppshheader.u4.hbmWatermark =
CreateMappedBitmap(psInfo->ppshheader.hInstance,
(INT_PTR)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0);
}
@@ -1535,7 +1535,7 @@
if ((psInfo->ppshheader.dwFlags & PSH_HEADER) &&
!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER))
{
- ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader =
+ psInfo->ppshheader.u5.hbmHeader =
CreateMappedBitmap(psInfo->ppshheader.hInstance,
(INT_PTR)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0);
}
}
@@ -2081,7 +2081,7 @@
index = PROPSHEET_FindPageByResId(psInfo, result);
if(index >= psInfo->nPages) {
index = old_index;
- WARN("Tried to skip to nonexistant page by res id\n");
+ WARN("Tried to skip to nonexistent page by res id\n");
break;
}
continue;
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 (original)
+++ trunk/reactos/dll/win32/comctl32/rebar.c Wed Dec 12 11:52:08 2007
@@ -2797,7 +2797,7 @@
static LRESULT
REBAR_PushChevron(const REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- if (wParam >= 0 && (UINT)wParam < infoPtr->uNumBands)
+ if ((UINT)wParam < infoPtr->uNumBands)
{
NMREBARCHEVRON nmrbc;
REBAR_BAND *lpBand = &infoPtr->bands[wParam];
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 (original)
+++ trunk/reactos/dll/win32/comctl32/toolbar.c Wed Dec 12 11:52:08 2007
@@ -3190,7 +3190,7 @@
(LPWSTR)RT_DIALOG)))
return FALSE;
- if(!(template = (LPVOID)LoadResource (COMCTL32_hModule, hRes)))
+ if(!(template = LoadResource (COMCTL32_hModule, hRes)))
return FALSE;
ret = DialogBoxIndirectParamW ((HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE),
@@ -5893,7 +5893,7 @@
infoPtr->nButtonDown = -1;
/* Issue NM_RELEASEDCAPTURE to parent to let him know it is released */
- TOOLBAR_SendNotify ((NMHDR *) &hdr, infoPtr,
+ TOOLBAR_SendNotify (&hdr, infoPtr,
NM_RELEASEDCAPTURE);
/* native issues TBN_ENDDRAG here, if _LBUTTONDOWN issued the
Modified: trunk/reactos/dll/win32/comctl32/tooltips.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltip…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tooltips.c (original)
+++ trunk/reactos/dll/win32/comctl32/tooltips.c Wed Dec 12 11:52:08 2007
@@ -1109,7 +1109,7 @@
if (IS_INTRESOURCE(lpToolInfo->lpszText)) {
TRACE("add string id %x\n", LOWORD(lpToolInfo->lpszText));
- toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText;
+ toolPtr->lpszText = lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACKW) {
Modified: trunk/reactos/dll/win32/comctl32/trackbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/trackba…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/trackbar.c (original)
+++ trunk/reactos/dll/win32/comctl32/trackbar.c Wed Dec 12 11:52:08 2007
@@ -811,7 +811,7 @@
ClientToScreen(infoPtr->hwndSelf, &pt);
SendMessageW (infoPtr->hwndToolTip, TTM_TRACKPOSITION,
- 0, (LPARAM)MAKELPARAM(pt.x, pt.y));
+ 0, MAKELPARAM(pt.x, pt.y));
}
Modified: trunk/reactos/dll/win32/comctl32/treeview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treevie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/treeview.c (original)
+++ trunk/reactos/dll/win32/comctl32/treeview.c Wed Dec 12 11:52:08 2007
@@ -3994,7 +3994,7 @@
if(ht.hItem && (ht.flags & TVHT_ONITEM))
{
infoPtr->focusedItem = ht.hItem;
- InvalidateRect(hwnd, &(((HTREEITEM)(ht.hItem))->rect), TRUE);
+ InvalidateRect(hwnd, &ht.hItem->rect, TRUE);
if(infoPtr->selectedItem)
InvalidateRect(hwnd, &(infoPtr->selectedItem->rect), TRUE);
@@ -4173,7 +4173,6 @@
SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
(WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
}
-
return 0;
}