LlStgsysDrawPage

Syntax:

void LlStgsysDrawPage (HLLSTG hStg, HDC hDC, HDC hPrnDC, BOOL bAskPrinter, _PCRECT pRC, INT nPageIndex, BOOL bFit, LPVOID pReserved);

Task:

Paints a preview page to a screen or printer device.

Parameter:

hStg: The handle returned by LlStgsysStorageOpen()

hDC: DC for printing (usually a printer or screen device). Can be NULL (see below).

hPrnDC: Reference DC which can be used to get the unprintable area etc. For a screen DC, this is the (default) printer DC, for a printer DC it is the same as hDC above. Can be NULL (See below).

bAskPrinter: If hPrnDC is NULL, this flag defines whether the user is asked about the printer for the reference DC. If it is TRUE, he will be asked, if it is FALSE, the default printer will be used.

pRC: Points to a RECT structure containing the device coordinates for printing. If this is NULL, the printer's values will be used. Must not be NULL when printing to a non-printer DC!

nPageIndex: Page index (1..LlStgsysGetPageCount())

bFit: Defines whether the print should fit into the area (TRUE) or whether the original size should be kept (FALSE), although the latter might result in clipped output due to differences in paper size, unprintable area etc..

pReserved: NULL

Return value:

Error code

Hints:

If hDC is NULL, it will be set to hPrnDC after the reference DC has been created.

See Also:

LlStgsysPrint, LlStgsysStoragePrint