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;
23 /***********************************************************************
24 * MakeDragList (COMCTL32.13)
26 BOOL WINAPI MakeDragList (HWND hwndLB)
28 FIXME("(0x%x)\n", hwndLB);
34 /***********************************************************************
35 * DrawInsert (COMCTL32.15)
37 VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
39 FIXME("(0x%x 0x%x %d)\n", hwndParent, hwndLB, nItem);
44 /***********************************************************************
45 * LBItemFromPt (COMCTL32.14)
47 INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
53 FIXME("(0x%x %ld x %ld %s)\n",
54 hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
56 ScreenToClient (hwndLB, &pt);
57 GetClientRect (hwndLB, &rcClient);
58 nIndex = (INT)SendMessageA (hwndLB, LB_GETTOPINDEX, 0, 0);
60 if (PtInRect (&rcClient, pt))
62 /* point is inside -- get the item index */
65 if (SendMessageA (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR)
68 if (PtInRect (&rcClient, pt))
76 /* point is outside */
80 if ((pt.x > rcClient.right) || (pt.x < rcClient.left))
88 dwScrollTime = GetTickCount ();
90 if ((dwScrollTime - dwLastScrollTime) < 200)
93 dwLastScrollTime = dwScrollTime;
95 SendMessageA (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
103 static LRESULT CALLBACK
104 DRAGLIST_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)