Transferring text from clipboard to file and vice-versa
I want to transfer clipboard text to a file, and when the file processing is finished, again transfer the file data back to clipboard. How to do that?
[150 byte] By [
rpk2006] at [2007-11-18 17:38:42]

# 1 Re: Transferring text from clipboard to file and vice-versa
just try the following link.
http://www.stanford.edu/group/itss/samson/help/file_transfers.htm
# 3 Re: Transferring text from clipboard to file and vice-versa
hi rpk!
if u wanna store a image captured in clipboard to any bmp file u have to go with foillowing steps.
1> The clipboard must be open.
2>set the clipboard to type bitmap in its argument
3>getclipboard data with this direct API.It returns the handle of ur captured image.
4>read the file fully and write to newly opened/created bmp file character by character.U may go till u read the known number of bytes.
5>close the file and clipboard.
6> beware if the size is not compatible it will not so the image.
for vice-versa u cant just read .bmp file and put in clipboard.
U will have to go through concept og Virtual window.
That is create a compatible memory device context copy the image into virtual window and blast paint with bitblt to a window and then capture through VK_SNAPSHOT to clipboard.
i applied this steps while screen capturing in SDK so it will work for u too.if u still need code i will send u.
bye
# 4 Re: Transferring text from clipboard to file and vice-versa
I only want to transfer the text I retrieved from clipboard and transfer it directly to a file, and vice versa. Text can be Plain or Rich Text