4 * Copyright 1999 Eric Kohl
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * This is just a dummy control. An author is needed! Any volunteers?
22 * I will only improve this control once in a while.
23 * Eric <ekohl@abo.rhein-zeitung.de>
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(commctrl
);
35 static DWORD dwLastScrollTime
= 0;
37 /***********************************************************************
38 * MakeDragList (COMCTL32.13)
40 BOOL WINAPI
MakeDragList (HWND hwndLB
)
42 FIXME("(%p)\n", hwndLB
);
48 /***********************************************************************
49 * DrawInsert (COMCTL32.15)
51 VOID WINAPI
DrawInsert (HWND hwndParent
, HWND hwndLB
, INT nItem
)
53 FIXME("(%p %p %d)\n", hwndParent
, hwndLB
, nItem
);
58 /***********************************************************************
59 * LBItemFromPt (COMCTL32.14)
61 INT WINAPI
LBItemFromPt (HWND hwndLB
, POINT pt
, BOOL bAutoScroll
)
67 FIXME("(%p %ld x %ld %s)\n",
68 hwndLB
, pt
.x
, pt
.y
, bAutoScroll
? "TRUE" : "FALSE");
70 ScreenToClient (hwndLB
, &pt
);
71 GetClientRect (hwndLB
, &rcClient
);
72 nIndex
= (INT
)SendMessageA (hwndLB
, LB_GETTOPINDEX
, 0, 0);
74 if (PtInRect (&rcClient
, pt
))
76 /* point is inside -- get the item index */
79 if (SendMessageA (hwndLB
, LB_GETITEMRECT
, nIndex
, (LPARAM
)&rcClient
) == LB_ERR
)
82 if (PtInRect (&rcClient
, pt
))
90 /* point is outside */
94 if ((pt
.x
> rcClient
.right
) || (pt
.x
< rcClient
.left
))
102 dwScrollTime
= GetTickCount ();
104 if ((dwScrollTime
- dwLastScrollTime
) < 200)
107 dwLastScrollTime
= dwScrollTime
;
109 SendMessageA (hwndLB
, LB_SETTOPINDEX
, (WPARAM
)nIndex
, 0);
117 static LRESULT CALLBACK
118 DRAGLIST_WindowProc (HWND hwnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)