Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 289 of file draglist.c.
Referenced by TOOLBAR_Cust_AvailDragListNotification(), and TOOLBAR_Cust_ToolbarDragListNotification().
{ RECT rcClient; INT nIndex; DWORD dwScrollTime; TRACE("(%p %d x %d %s)\n", hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE"); ScreenToClient (hwndLB, &pt); GetClientRect (hwndLB, &rcClient); nIndex = (INT)SendMessageW (hwndLB, LB_GETTOPINDEX, 0, 0); if (PtInRect (&rcClient, pt)) { /* point is inside -- get the item index */ while (TRUE) { if (SendMessageW (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR) return -1; if (PtInRect (&rcClient, pt)) return nIndex; nIndex++; } } else { /* point is outside */ if (!bAutoScroll) return -1; if ((pt.x > rcClient.right) || (pt.x < rcClient.left)) return -1; if (pt.y < 0) nIndex--; else nIndex++; dwScrollTime = GetTickCount (); if ((dwScrollTime - dwLastScrollTime) < DRAGLIST_SCROLLPERIOD) return -1; dwLastScrollTime = dwScrollTime; SendMessageW (hwndLB, LB_SETTOPINDEX, nIndex, 0); } return -1; }