Solved Anyone know how to store screenshot into array? please reply ASAP

Hexui Undetected CSGO Cheats PUBG Accounts


Nov 2, 2013
anyone who can please teach me how to store a screenshot into array pls and sorry for my bad english


I'm not your friend
Jan 21, 2014
Pass the target window handle to GetDC(), t will return the the device context of the window.

Pass the device context to CreateCompatibleDC() to create a compatible DC.

Use CreateCompatibleBitmap(), passing in the DC and the size of the window. This returns a handle to a bitmap

Use SelectObject() to select the bitmap

Use BitBlt() to do a bitblock transfer of the selected pixels from the regular DC into the compatible DC using the SRCCOPY raster operation code to do a normal copy.

Create a BITMAP object. Use GetObject() and pass the handle to the bitmap you created.

Create a BITMAPINFOHEADER and define the member vars. Create an array of unsigned chars big enough to fit all the pixels from your bitmap.

Use GetDIBits() passing in the handle to the compatible bitmap, the bitmap header and a pointer to the pixel array. This loads the pixels from the bitmap into the pixel array.

Now parse all that juicy pixel data, search for the colors you're looking for and test the results against your conditionals to decide what to do next.

Don't forget to delete objects and release memory & device contexts.

I believe this is the tutorial I followed where I learned this, courtesy of MSDN: Capturing an Image - Win32 apps

I answered this question on SO: Taking a screenshot, analyzing it, then deleting it

full code here: Source Code - Screenshot Cleaner - Bypass Fairfight & Punkbuster - BitBlt Hook
Last edited:


Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
Depends in which format have you got the image. Is it an array of pixels, a bitmap, etc.


Full Member
Nov 13, 2013
This link should be stickied on every forum ever
"Never, ever expect hackers to be able to read closed proprietary document formats like Microsoft Word or Excel. Most hackers react to these about as well as you would to having a pile of steaming pig manure dumped on your doorstep. Even when they can cope, they resent having to do so." THAT LINE THOU :D:D
Community Mods