Internal vs Native Drag in Clipboard Apps
By Khushi Yadav
A clipboard app can let you drag a card to reorder the list. That gesture is internal. Dragging the same card into File Explorer, Word, or Slack is external. They share a mouse, not a data contract. HTML5 drag-and-drop inside a webview can show a perfect ghost image and still deliver nothing Explorer understands.
Microsoft documents the external contract for files: a data object that includes CF_HDROP, started with DoDragDrop. This explainer stays on that documented line. It does not invent custom OLE wrappers.
Two drags, two audiences
| Drag | Audience | Success looks like |
|---|---|---|
| Internal | The same app | Cards swap order, merge, or ungroup |
| External | Another process | Explorer copies files; Word places; Slack attaches |
Internal drag can be pure UI state. No clipboard format is required. External drag must publish formats the target already knows: CF_HDROP for existing files, CF_DIB / PNG for pixels, HTML Format or CF_UNICODETEXT for text, CFSTR_INETURL for a URL.
Microsoft Learn: if CF_HDROP is present, an OLE drag loop can even simulate WM_DROPFILES for old non-OLE targets. A web DataTransfer that never created that HDROP cannot.
How Windows File Drop Lists Actually Work. Why Some Apps Accept Paste but Reject Drag.
What “native drag” means here
Microsoft Learn, DoDragDrop:
- The source provides an IDataObject (the payload) and an IDropSource (cursor/feedback).
- dwOKEffects says whether copy, move, or link is allowed.
- The function runs the drag loop until drop or cancel.
This article will not reconstruct those COM interfaces beyond the names Microsoft publishes. The user-facing test is simple: drop on a visible Explorer folder. If a file appears, the source offered a real file list (or wrote a file and offered its path). If nothing happens, the drag was cosmetic.
CFSTR_INDRAGLOOP, documented on Microsoft Learn, lets a data object say it is still inside the drag so a target does not force expensive rendering on every hover. That is an optimization for real OLE objects, not for HTML5 ghosts.
Why HTML5 drag looks like it works
Embedded web UIs (Electron, WebView2, many “modern” shelves) implement the HTML drag-and-drop API. The ghost follows the cursor. drop fires inside the same web document. Reorder works. Merge works.
When the cursor leaves the webview:
- Some frameworks cancel the drag.
- Some send a generic text/uri-list.
- Some create a
.url. - Some, if the app added a native bridge, start DoDragDrop with HDROP.
Without that last step, Explorer has nothing to copy. HTML Drops That Turn Into Useless Internet Shortcuts.
Paste can still work. Ctrl+C in the shelf plus Ctrl+V in the target uses the clipboard, not the drag loop. Users then say “paste works, drag does not,” which is accurate.
File lists must be complete
External file drag should walk every path with DragQueryFile, not the first FileNameW string. Multi-File Copy From Explorer: Why Tools Miss Files.
If the card is a stack, drop should publish one HDROP with all members that still exist. Missing members should fail visibly. Broken Paths: When a Saved File Clip Points at Nothing.
If the card is a bitmap, Explorer still will not accept it as a file unless the app writes a PNG and then offers HDROP. How to Copy an Image So Explorer Gets a File.
Elevation and other hard walls
Even a perfect OLE drag dies at an elevated window. Dragging Out of a Clipboard App Into an Elevated Window.
Other external failures that are not “internal versus external”:
- Target wants pixels, you offered files (or the reverse).
- Target is a browser compose box that only accepts its own upload control.
- Paths are on a disconnected share.
History is not a drag source for files
Win+V pastes the selected text, HTML, or bitmap. Microsoft does not document Win+V as an OLE file drag source. You cannot drag yesterday’s Explorer copy out of it; the copy was never there. 25 items, 4 MB, restart wipe except pins.
Why You Cannot Drag Old Clipboard Files Into Explorer.
How to test in two minutes
- Put
a.txton the Desktop. - Get that file onto the clipboard UI (copy in Explorer, or drop onto the shelf — if drop onto the shelf works, the shelf is already an external target).
- Drag the card to a second Explorer folder.
- If
a.txtappears there, external drag works. - Drag two files as a stack. If only one arrives, the external drag published a single-name format. Multi-File Copy From Explorer: Why Tools Miss Files.
- Drag a text card to Notepad. If text appears, the app offered CF_UNICODETEXT on the same drag path. If nothing appears, it may only implement file HDROP.
A shelf that passes (4) and (5) is doing native drag. A shelf that only reorders cards in step 3’s first inch of motion, then cancels at the window border, is internal-only. The ghost image is not evidence.
Repeat the test after a reboot if the card is a path reference. A beautiful drag of a missing file is still a failure. Should File Clips Store a Copy or a Reference?.
Preferred drop effect matters for Explorer: Ctrl while dragging often forces copy; Shift often forces move, matching Explorer’s own modifiers. If a shelf ignores modifiers and always copies, say so. Microsoft Learn documents CFSTR_PREFERREDDROPEFFECT as the source’s hint, not a user-visible checkbox.
What to demand from a shelf
- Internal drag for organize (reorder, merge, ungroup).
- External drag via a native data object, tested on Explorer.
- Distinct cursor feedback when leaving the shelf.
- Keyboard alternatives for every drag gesture.
When Drag-and-Drop Is the Wrong Interface. Drop Zones: Why the Edge of the Screen Matters.
Edge-Drop’s honest claim, when it makes one, should be native file drag-out, not “we have a ghost image.” If a competitor only reorders inside a window, that is a different product.
FAQ
Is HTML5 drag “fake”? Inside the app it is real UI. Across processes, without a native data object, Explorer will not see files.
Does paste prove drag will work? No. Paste uses the clipboard. Drag uses DoDragDrop.
Must every card support external drag? File and image cards that claim drag-out must. Text cards can paste only. File cards that advertise drag-out must pass the Explorer drop test above.
If the destination is elevated, even a perfect native drag fails. That is UIPI, not an HTML5 problem. Dragging Out of a Clipboard App Into an Elevated Window.
Related reading
- Should File Clips Store a Copy or a Reference?
- Using the Clipboard as a Temporary File Staging Area
- Why You Cannot Drag Old Clipboard Files Into Explorer
- How to Get a Screenshot Into Photoshop Without Recopying
Sources
- DoDragDrop function (Microsoft Learn) — documented OLE drag loop.
- Shell Clipboard Formats (Microsoft Learn) — CF_HDROP; CFSTR_INDRAGLOOP; URL and HTML are separate.
- Handling Shell Data Transfer Scenarios (Microsoft Learn) — existing files via HDROP; DragQueryFile.
- Transferring Shell Objects with Drag-and-Drop (Microsoft Learn) — Shell data on the clipboard versus drag.
- Using the clipboard (Microsoft Support) — Win+V is not a file drag source.
Khushi Yadav is a B.Tech Computer Science Engineering student interested in technology, software, and exploring practical applications of computer science. She enjoys learning new concepts and contributing to technology-focused projects.
GitHub · LinkedInCopy. Stack. Drop.
Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.
Download for Windows Get from Microsoft Store
How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge-Drop vs Win+V · Support
Free · Lightweight · Privacy First