views:

64

answers:

1

I want to turn a screen shot from the clipboard into a array data (Red/Green/Blue) in my program. so i guess it's as simple as that. but i don't want to use anything else then the print screen and clipboard if i can?

anyway any questions just ask.

A: 

You can call GetClipboardData specifying (for example) CF_DIB format, which will return a BITMAPINFO structure followed immediately by an array of data for the pixels. The BITAMPINFO structure will contain information (e.g., bits per pixel, size of image) to tell you how to interpret the pixel data.

Edit: Unless you're really intent on using the Print Screen key, it's probably easier to blit the data directly from the screen when you want it. This avoids blowing away whatever the user already had in the clipboard, and it's generally easier to do as well.

Jerry Coffin
ok first yes i want to use print screen :\ it's better for what im doing. and im sorry i understand it somewhat how do i use this? like getclipboarddata will just give me the value of 2.. here is code :UINT uFormat = CF_BITMAP; GetClipboardData(uFormat);also bitmapinfo you mind explaining how to use it :(
blood
yea i could not get this to work....
blood