Getting actual viewport size in pixels...

I’m creating win32 window & I need to take screenshot. because of the fact that window title & borders are counted in when crating window there appears untouched pixels in my BMP file I create.

BTW, is it possible to save all image data to HDD, I have a problem when window is partially outside desktop, part that I don’t see just gets clipped.

Render to a pbuffer, that way, you won’t have problems with overlapping or out of screen windows.