Replies: 1 comment 1 reply
-
You can fill the https url in the data package and use the url during the drop event. Or am I missing something? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've written a little file-transfer application written in C++ using WinUI ... it logs into a http server, shows the user a list of files available on the server, and lets the user upload or download files.
Now I have a request that my users would like to be able to drag a file out of the server-files-list-view and onto the desktop, or into an open folder window when i know the resource https path.
As we can see in https://docs.microsoft.com/en-us/windows/apps/design/input/drag-and-drop
I know how to fill data package object with local file, but I want to fill a data package object with https async.
In short, there are a Drag Source(my app) and a Drag Target(folder, Desktop and other app).
Drag the control of Drag Source(my app) to Drag Target(folder, Desktop and other app), trigger https download, download the file to the Drag Target.
The difficulty lies in how to download https resources when the Drag Target responds to the “Drop” Event.
more information:
I know that for the drag and drop function in win32 API (https://docs.microsoft.com/en-us/windows/win32/api/ole2/nf-ole2-dodragdrop), you can implement IDataObject yourself, in the IDataObject::GetData interface perform a download operation. Is there a way to achieve the same in winui?
@castorix Do you have any good idea?
Code show as below:
Beta Was this translation helpful? Give feedback.
All reactions