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 * Eric <ekohl@abo.rhein-zeitung.de>
36 #include "wine/debug.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(commctrl
);
41 static DWORD dwLastScrollTime
= 0;
43 /***********************************************************************
44 * MakeDragList (COMCTL32.13)
46 * Makes a normal ListBox into a DragList by subclassing it.
52 BOOL WINAPI
MakeDragList (HWND hwndLB
)
54 FIXME("(%p)\n", hwndLB
);
60 /***********************************************************************
61 * DrawInsert (COMCTL32.15)
63 * Draws insert arrow by the side of the ListBox item in the parent window.
68 VOID WINAPI
DrawInsert (HWND hwndParent
, HWND hwndLB
, INT nItem
)
70 FIXME("(%p %p %d)\n", hwndParent
, hwndLB
, nItem
);
75 /***********************************************************************
76 * LBItemFromPt (COMCTL32.14)
78 * Gets the index of the ListBox item under the specified point,
79 * scrolling if bAutoScroll is TRUE and pt is outside of the ListBox.
82 * The ListBox item ID if pt is over a list item or -1 otherwise.
84 INT WINAPI
LBItemFromPt (HWND hwndLB
, POINT pt
, BOOL bAutoScroll
)
90 FIXME("(%p %ld x %ld %s)\n",
91 hwndLB
, pt
.x
, pt
.y
, bAutoScroll
? "TRUE" : "FALSE");
93 ScreenToClient (hwndLB
, &pt
);
94 GetClientRect (hwndLB
, &rcClient
);
95 nIndex
= (INT
)SendMessageA (hwndLB
, LB_GETTOPINDEX
, 0, 0);
97 if (PtInRect (&rcClient
, pt
))
99 /* point is inside -- get the item index */
102 if (SendMessageA (hwndLB
, LB_GETITEMRECT
, nIndex
, (LPARAM
)&rcClient
) == LB_ERR
)
105 if (PtInRect (&rcClient
, pt
))
113 /* point is outside */
117 if ((pt
.x
> rcClient
.right
) || (pt
.x
< rcClient
.left
))
125 dwScrollTime
= GetTickCount ();
127 if ((dwScrollTime
- dwLastScrollTime
) < 200)
130 dwLastScrollTime
= dwScrollTime
;
132 SendMessageA (hwndLB
, LB_SETTOPINDEX
, (WPARAM
)nIndex
, 0);
140 static LRESULT CALLBACK
141 DRAGLIST_WindowProc (HWND hwnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)