int dest = 0; /* initialise to placate gcc */
switch (dlm->uNotification) {
case DL_BEGINDRAG:
+ /* Add a dummy item to make pl_itemfrompt() work
+ * better.
+ * FIXME: this causes scrollbar glitches if the count of
+ * listbox contains >= its height. */
hdl->dummyitem =
SendDlgItemMessage(hwnd, hdl->listid,
LB_ADDSTRING, 0, (LPARAM) "");
hdl->srcitem = LBItemFromPt(dlm->hWnd, dlm->ptCursor, TRUE);
hdl->dragging = 0;
/* XXX hack Q183115 */
- SetWindowLong(hwnd, DWL_MSGRESULT, TRUE);
+ SetWindowLongPtr(hwnd, DWLP_MSGRESULT, TRUE);
ret |= 1; break;
case DL_CANCELDRAG:
DrawInsert(hwnd, dlm->hWnd, -1); /* Clear arrow */
if (dest > hdl->dummyitem) dest = hdl->dummyitem;
DrawInsert (hwnd, dlm->hWnd, dest);
if (dest >= 0)
- SetWindowLong(hwnd, DWL_MSGRESULT, DL_MOVECURSOR);
+ SetWindowLongPtr(hwnd, DWLP_MSGRESULT, DL_MOVECURSOR);
else
- SetWindowLong(hwnd, DWL_MSGRESULT, DL_STOPCURSOR);
+ SetWindowLongPtr(hwnd, DWLP_MSGRESULT, DL_STOPCURSOR);
ret |= 1; break;
case DL_DROPPED:
if (hdl->dragging) {