Hello;
I was just looking into the clipboard functions and found that the specialized function CopyBitmapToClipboard
requires a CLIPBOARDOWNER
.
I assume this has to do with delay-rendering of clipboard content and the WM_RENDERFORMAT
message under Windows - no idea how the clipboard works under Mac... Wasn't actually aware that C4D uses that mechanism at all, but that's how it looks.
So, if I use CopyBitmapToClipboard
in a script or plugin of my own, I wouldn't delay-render the bitmap, so I'd use neither the CLIPBOARDOWNER_BODYPAINT
nor the CLIPBOARDOWNER_PICTUREVIEWER
constants, which (I assume) would cause the clipboard to send WM_RENDERFORMAT
to either window instead of my script. Of course, these are the only constants available, and the function description does not offer anything else.
When getting a bitmap from the system, GetC4DClipboardOwner
returns 0, so I assume I can pass 0 safely too in calls to CopyBitmapToClipboard
? Or am I overlooking some larger context here? As I am neither BodyPaint nor the PictureViewer, I would never want to use these constants anyway. But there is no speaking constant for 0, and CopyBitmapToClipboard
makes it even a mandatory parameter?
Can I crash C4D by using one of the two CLIPBOARDOWNER
constants in a script (while not implementing a delay-render to clipboard at all which C4D doesn't even offer)?
GetC4DClipboardOwner
allows me to retrieve the clipboard owner, but under what circumstances would I want to know that? If this is only for the delayed retrieval of clipboard content, then this should work fully transparently (?)
(Edit: Does look better with less formatting now?)