July 16th, 2009 11:56 AM
#1
Getting image from the clipboard and then saving it into a image file.
How to Get an image from the clipboard and then save it into a image file?
July 16th, 2009 12:02 PM
#2
Re: Getting image from the clipboard and then saving it into a image file.
Use WinAPI functions OpenClipboard(), CloseClipboard(), GetClipboardData() to deal with clipboard. You'll probably need to work with bitmap then.
July 16th, 2009 05:50 PM
#3
Re: Getting image from the clipboard and then saving it into a image file.
A n00b needs more help here:
#include <windows.h>
int main()
{
OpenClipboard(NULL);
GetClipboardData(CF_BITMAP);
return 0;
}
What now?
July 18th, 2009 08:10 AM
#4
Re: Getting image from the clipboard and then saving it into a image file.
1) I would write smth like this:
Code:
HBITMAP hBitmap = (HBITMAP)GetClipboardData(CF_BITMAP);
2) Do you know what MSDN is?
If you have any questions first look through some articles there:http://msdn.microsoft.com/en-us/library/default.aspx
July 18th, 2009 02:12 PM
#5
Re: Getting image from the clipboard and then saving it into a image file.
Well, then I advice you to try to look what's there in the bitmap handle. Output it to window.
Then find any bmp file format specification in the Internet and write bitmap to a file.
This is one my question I asked to make sure I know all the methods to access RGB:http://www.codeguru.com/forum/showth...61#post1860961
By the way I'm also working on a problem related to BMP.
Tags for this Thread
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks