| geokas (3) | |||
|
Hallo zusammen! Ich versuche ein Objekt vom Typ Gdiplus::Image in Zwischenablage kopieren, damit später in einer Anwendung (z.B. MS-Word, Paint, Photoshop etc.) mit Hilfe Ctrl-V einfügen möglich wäre. Dafür benutze ich follgende Routine
Alles läuft ohne Fehlern. Aber beim Enfügen-Aktion wird in andere Programm nichts eingefügt. Kann mir jemand sagen, was in meinem Qulellkode stimmt nicht. Danke im voraus geokas | |||
|
|
|||
| coder777 (2382) | |
|
I suggest using english. Look at this: http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/816a35f6-9530-442b-9647-e856602cc0e2 you can't just set the handle to the bitmap. you need to copy the bits themself | |
|
|
|
| geokas (3) | ||||
Thanks for your answer
I have tried to do so
Now is better, because now isn't nothing. Now is black rectangle, which has same size as my image. I don't understand where is now my mistake? | ||||
|
Last edited on
|
||||
| coder777 (2382) | |
|
Here's another example: http://us.generation-nt.com/answer/gdi-plus-image-clipboard-help-27536922.html Especially #4 looks promising An important thing is that you detach the hbitmap from the object (like imgSrc), since it must not be destroyed. (Maybe you should consider to use a higher gui lib like QT or wxWidgets) | |
|
|
|
| geokas (3) | |||
|
Thank's for your help I make with help of your link http://us.generation-nt.com/answer/gdi-plus-image-clipboard-help-27536922.html new example. It works
| |||
|
|
|||