PrintWindow
The PrintWindow function copies a visual window into the specified device context (DC), typically a printer DC.
BOOL PrintWindow(
HWND hwnd, // Window to copy
HDC hdcBlt, // HDC to print into
UINT nFlags // Optional flags
);
Parameters
hwnd
Handle to the window that will be copied.
hdcBlt
Handle to the device context.
nFlags
Specifies the drawing options. It can be one of the following values. Value Meaning
PW_CLIENTONLY Only the client area of the window is copied to hdcBlt. By default, the entire window is copied.
Return Values
If the function succeeds, it returns a nonzero value.
If the function fails, it returns zero.
Remarks
This function is similar to WM_PRINT. Before calling PrintWindow, first select a bitmap into hdcBlt.
Requirements
StretchBlt
The StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary. The system stretches or compresses the bitmap according to the stretching mode currently set in the destination device context.
BOOL StretchBlt(
HDC hdcDest, // handle to destination DC
int nXOriginDest, // x-coord of destination upper-left corner
int nYOriginDest, // y-coord of destination upper-left corner
int nWidthDest, // width of destination rectangle
int nHeightDest, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXOriginSrc, // x-coord of source upper-left corner
int nYOriginSrc, // y-coord of source upper-left corner
int nWidthSrc, // width of source rectangle
int nHeightSrc, // height of source rectangle
DWORD dwRop // raster operation code
);