Autor Beitrag
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mi 11.05.11 16:32 
Hi,

ich versuche grad eine Datei in die Zwischenablage zu packen, einmal zum kopieren und einmal zum ausschneiden.

Ich blicke nur bei der WinAPI hilfe da überhaupt nichtmehr durch was da wie gemacht werden muß.
Scheinbar brauche ich irgendeine art IDataObject wo ich tausende funktionen implementieren muß etc..

Das einzige was ich schon relativ sicher weiß ist das ich ein Clipboard Format CFSTR_PREFERREDDROPEFFECT (Delete-On-Paste) registrieren und nutzen muß für das ausschneiden, damit der Explorer weiß was er mit der datei machen muß.

Hat da jemand erfahrung mit?

Das ganze allerdings nur auf Win32-API basis, nutze C++

Danke,
Aya

_________________
Aya
I aim for my endless dreams and I know they will come true!


Zuletzt bearbeitet von Aya am Do 19.05.11 16:05, insgesamt 1-mal bearbeitet
Aya Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Do 19.05.11 16:03 
Bin leider selbst noch nicht weiter gekommen mit dem Problem.. hat hier keiner sowas schonmal gemacht :?

_________________
Aya
I aim for my endless dreams and I know they will come true!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 20.05.11 06:07 
Doch, aber nur in C# und Prism...
Da geht das Kopieren mittels Auswahl in einem Dialog schlicht so:
ausblenden C#-Quelltext
1:
2:
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
                Clipboard.SetDataObject(new DataObject(DataFormats.FileDrop, openFileDialog1.FileNames));


Und Ausschneiden so:
stackoverflow.com/qu...es-to-clipboard-in-c

Ich habe aber kurz Suche bei Google GOOGLE BEFRAGT, da kam das heraus:
www.swissdelphicente...showcode.php?id=1038
Und da gibts noch ein paar mehr Ergebnisse.
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Fr 20.05.11 10:51 

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS