I have been using
::SetClipboardData(CF_TEXT, hMem);
where hMem is a handle that has come back from
GlobalAlloc(GMEM_MOVEABLE, dwBytes)
However i have found that using the CF_TEXT causes the clipboard to
insert a 0x00 at the end of my array of binary data.
I could create my own clipboard format, but that would mean that I would
not be able to paste data into other apps (like NotePad) when the data
was actually printable text.
Is there a CF_BINARY format that I have missed ?
Anyone have a good solution for this ?
Thanks in advance
dom
--
dcu...@ANTISPAMti.com
Please remove ANTISPAM from line above to reply to correct address.
Or..
when you push paste in your program ...use the clipboard stored info
and then kill the last character. Hence getting rid of 0x00
Later,
Steve
Sent via Deja.com
http://www.deja.com/
This is how alot of hexeditors work (I know because I'm writing
one at the minute).
James
"Dominic Curran" <dcu...@ANTISPAMti.com> wrote in message
news:3A722E06...@ANTISPAMti.com...
I was thinking of using GlobalHandle and then GlobalSize, but I think
thats going to return the number of bytes GlobalAlloc real allocated on
the copy, rather than the number I asked for, which might mean I pasted
more bytes than I copied.
Your ways much better.
thanks again
dom