# HG changeset patch # User Frank Benoit # Date 1202918145 -3600 # Node ID c605bf6c2f48ba9cd3b5309e613d886e48a4f831 # Parent 82d3cef3912def71e6310b81a602aa9890a8e6ad TableDragSourceEffect diff -r 82d3cef3912d -r c605bf6c2f48 dsss.conf --- a/dsss.conf Wed Feb 13 16:50:35 2008 +0100 +++ b/dsss.conf Wed Feb 13 16:55:45 2008 +0100 @@ -3,7 +3,6 @@ [dwt] type=library debugflags+=-g -gc -debug -exclude=dwt/dnd [simple.d] diff -r 82d3cef3912d -r c605bf6c2f48 dwt/dnd/TableDragSourceEffect.d --- a/dwt/dnd/TableDragSourceEffect.d Wed Feb 13 16:50:35 2008 +0100 +++ b/dwt/dnd/TableDragSourceEffect.d Wed Feb 13 16:55:45 2008 +0100 @@ -23,6 +23,8 @@ import dwt.dnd.DragSourceEffect; import dwt.dnd.DragSourceEvent; +import dwt.dwthelper.utils; + /** * This class provides default implementations to display a source image * when a drag is initiated from a Table. @@ -93,22 +95,22 @@ int count = Math.min(selection.length, 10); Rectangle bounds = selection[0].getBounds(0); for (int i = 1; i < count; i++) { - bounds = bounds.union_(selection[i].getBounds(0)); + bounds = bounds.makeUnion(selection[i].getBounds(0)); } auto hDC = OS.GetDC(null); auto hDC1 = OS.CreateCompatibleDC(hDC); auto bitmap = OS.CreateCompatibleBitmap(hDC, bounds.width, bounds.height); auto hOldBitmap = OS.SelectObject(hDC1, bitmap); - RECT rect = new RECT(); + RECT rect; rect.right = bounds.width; rect.bottom = bounds.height; - int hBrush = OS.GetStockObject(OS.WHITE_BRUSH); - OS.FillRect(hDC1, rect, hBrush); + auto hBrush = OS.GetStockObject(OS.WHITE_BRUSH); + OS.FillRect(hDC1, &rect, hBrush); for (int i = 0; i < count; i++) { TableItem selected = selection[i]; Rectangle cell = selected.getBounds(0); - POINT pt = new POINT(); - int imageList = OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), pt); + POINT pt; + HANDLE imageList = cast(HANDLE) OS.SendMessage (table.handle, OS.LVM_CREATEDRAGIMAGE, table.indexOf(selected), &pt); OS.ImageList_Draw(imageList, 0, hDC1, cell.x - bounds.x, cell.y - bounds.y, OS.ILD_SELECTED); OS.ImageList_Destroy(imageList); }