Changeset 2126 for trunk/src/comctl32/draglist.c
- Timestamp:
- Dec 18, 1999, 9:57:01 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/draglist.c
r104 r2126 13 13 */ 14 14 15 /* WINE 991212 level */ 16 15 17 #include "commctrl.h" 18 19 static DWORD dwLastScrollTime = 0; 16 20 17 21 18 22 BOOL WINAPI MakeDragList (HWND hwndLB) 19 23 { 20 // FIXME (commctrl,"(0x%x)\n", hwndLB);24 FIXME("(0x%x)\n", hwndLB); 21 25 22 26 … … 27 31 VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem) 28 32 { 29 // FIXME (commctrl,"(0x%x 0x%x %d)\n", hwndParent, hwndLB, nItem);33 FIXME("(0x%x 0x%x %d)\n", hwndParent, hwndLB, nItem); 30 34 31 35 … … 35 39 INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll) 36 40 { 37 // FIXME (commctrl, "(0x%x %ld x %ld %s)\n", 38 // hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE"); 41 RECT rcClient; 42 INT nIndex; 43 DWORD dwScrollTime; 39 44 45 FIXME("(0x%x %ld x %ld %s)\n", 46 hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE"); 47 48 ScreenToClient (hwndLB, &pt); 49 GetClientRect (hwndLB, &rcClient); 50 nIndex = (INT)SendMessageA (hwndLB, LB_GETTOPINDEX, 0, 0); 51 52 if (PtInRect (&rcClient, pt)) 53 { 54 /* point is inside -- get the item index */ 55 while (TRUE) 56 { 57 if (SendMessageA (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR) 58 return -1; 59 60 if (PtInRect (&rcClient, pt)) 61 return nIndex; 62 63 nIndex++; 64 } 65 } 66 else 67 { 68 /* point is outside */ 69 if (!bAutoScroll) 70 return -1; 71 72 if ((pt.x > rcClient.right) || (pt.x < rcClient.left)) 73 return -1; 74 75 if (pt.y < 0) 76 nIndex--; 77 else 78 nIndex++; 79 80 dwScrollTime = GetTickCount (); 81 82 if ((dwScrollTime - dwLastScrollTime) < 200) 83 return -1; 84 85 dwLastScrollTime = dwScrollTime; 86 87 SendMessageA (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0); 88 } 40 89 41 90 return -1; 42 91 } 43 92 93 94 static LRESULT CALLBACK 95 DRAGLIST_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 96 { 97 98 return FALSE; 99 }
Note:
See TracChangeset
for help on using the changeset viewer.