4 * Copyright 1999 Eric Kohl
7 * This is just a dummy control. An author is needed! Any volunteers?
8 * I will only improve this control once in a while.
9 * Eric <ekohl@abo.rhein-zeitung.de>
16 #include "debugtools.h"
18 DEFAULT_DEBUG_CHANNEL(commctrl)
21 static DWORD dwLastScrollTime = 0;
24 BOOL WINAPI MakeDragList (HWND hwndLB)
26 FIXME("(0x%x)\n", hwndLB);
33 VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
35 FIXME("(0x%x 0x%x %d)\n", hwndParent, hwndLB, nItem);
41 INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
47 FIXME("(0x%x %ld x %ld %s)\n",
48 hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
50 ScreenToClient (hwndLB, &pt);
51 GetClientRect (hwndLB, &rcClient);
52 nIndex = (INT)SendMessageA (hwndLB, LB_GETTOPINDEX, 0, 0);
54 if (PtInRect (&rcClient, pt))
56 /* point is inside -- get the item index */
59 if (SendMessageA (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR)
62 if (PtInRect (&rcClient, pt))
70 /* point is outside */
74 if ((pt.x > rcClient.right) || (pt.x < rcClient.left))
82 dwScrollTime = GetTickCount ();
84 if ((dwScrollTime - dwLastScrollTime) < 200)
87 dwLastScrollTime = dwScrollTime;
89 SendMessageA (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
97 static LRESULT CALLBACK
98 DRAGLIST_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)