consulting msdn i've been able to write this simple code...
it works, but it saves the snapshot in a file.
I would like to get the snapshot in a buffer and not in a file...
my final aim is to build a program that takes the income images, modifies them and shows the modified ones instead of the original income images.
so i need to get the images in a buffer because it will be much more fast to modify them.
Well where you have the line capFileSaveDIB(hwnd, "a.bmp");
could you not do something where you store it in an array? Or, you could open the bitmap as a file (open with "rb" (read-only, binary)) and then store the contents in a buffer?
Edit: As you want to modify it you'd open it as "wb" (writable, binary).