Thanks,
BB
Bitmap* WindowBlt(Rect& rect)
{
// create a bitmap from the visible clipping bounds of the graphics
object from the window
Bitmap* bitmap = new Bitmap(rect.Width, rect.Height);
// create a graphics object from the bitmap
Graphics *gfxBitmap = Graphics::FromImage(bitmap);
// get a device context for the bitmap
HDC hdcBitmap = gfxBitmap->GetHDC();
// get a device context for the window
HDC hdcWindow = GetWindowDC(EQWndw);
// bitblt the window to the bitmap
BitBlt(hdcBitmap, 0, 0, rect.Width, rect.Height, hdcWindow, rect.X,
rect.Y, SRCCOPY);
// release the bitmap's device context
gfxBitmap->ReleaseHDC(hdcBitmap);
ReleaseDC(EQWndw, hdcWindow);
// dispose of the bitmap's graphics object
delete gfxBitmap;
// return the bitmap of the window
return bitmap;
}