WindowsDropTargetMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

WindowsDropTargetMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Drag & Drop MBS Win Plugin 10.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The WindowsDropTargetMBS interface is one of the interfaces you implement to provide drag-and-drop operations in your application.

It contains methods used in any application that can be a target for data during a drag-and-drop operation. A drop-target application is responsible for:


The WindowsDropTargetMBS class contains methods that handle all these responsibilities except registering and revoking the application window as a drop target, for which you must call the AttachToWindow functions.

When To Implement

Implement the WindowsDropTargetMBS interface if you are developing an application that can act as a target for a drag-and-drop operation. The WindowsDropTargetMBS interface is associated with your application windows and is implemented on your window objects. Call the AttachToWindow function to register your window objects as drop targets.

When To Use

You do not call the methods of WindowsDropTargetMBS directly. The DoDragDrop function calls the WindowsDropTargetMBS methods during the drag-and-drop operation.

For example, DoDragDrop calls WindowsDropTargetMBS.DragEnter when it detects the mouse has moved over a window that is registered as a drag target. After the mouse has entered a drag-target window, DoDragDrop calls WindowsDropTargetMBS.DragOver as the mouse moves through the window and calls WindowsDropTargetMBS.DragLeave if the mouse leaves the target window or if the user cancels or completes the drag-and-drop operation. DoDragDrop calls WindowsDropTargetMBS.Drop if the drop finally occurs.

To see the ghost picture of the drag, please register a WindowsDragSourceMBS for the same window.

While the drag classes compile for Web Edition, they run on the server, so they have no effect on the client browser!

Constants

Constant Value Description
DROPEFFECT_COPY 1 One of the drop effect constants. Drop results in a copy. The original data is untouched by the drag source. more
DROPEFFECT_LINK 4 One of the drop effect constants. Drag source should create a link to the original data.
DROPEFFECT_MOVE 2 One of the drop effect constants. Drag source should remove the data.
DROPEFFECT_NONE 0 One of the drop effect constants. Drop target cannot accept the data.
DROPEFFECT_SCROLL &h80000000 One of the drop effect constants. Scrolling is about to start or is currently occurring in the target. This value is used in addition to the other values.
E_INVALIDARG &h80070057 One of the OLE error codes. An invalid argument was passed.
E_OUTOFMEMORY &h80000002 One of the OLE error codes. There was insufficient memory available for this operation.
E_UNEXPECTED &h8000FFFF One of the OLE error codes. An unexpected error has occurred.
MK_CONTROL 8 One of the key state constants. The CTRL key is down.
MK_LBUTTON 1 One of the key state constants. The left mouse button is down.
MK_MBUTTON &h10 One of the key state constants. The middle mouse button is down.
MK_RBUTTON 2 One of the key state constants. The right mouse button is down.
MK_SHIFT 4 One of the key state constants. The SHIFT key is down.
MK_XBUTTON1 &h20 One of the key state constants. The first X button is down.
MK_XBUTTON2 &h40 One of the key state constants. The second X button is down.
S_FALSE 1 One of the OLE error codes.
S_OK 0 One of the OLE error codes.

This class has no sub classes.

Some examples using this class:

Blog Entries


The items on this page are in the following plugins: MBS Win Plugin.


WindowsDriveNotificationMBS   -   WindowsEthernetAdapterMBS


💬 Ask a question or report a problem