Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SetDocumentPrinter method

Modifies the device context to ensure that IHTMLElementRender::DrawToDC works properly on all printers.

Syntax


HRESULT retVal = object.SetDocumentPrinter(bstrPrinterName, hDC);

Parameters

bstrPrinterName [in]

Type: BSTR

A BSTR containing the printer name.

hDC [in]

Type: HDC

An HDC for the printer specified by bstrPrinterName. After this method returns, pass hDC to IHTMLElementRender::DrawToDC to draw to the printer.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

With some printers, running IHTMLElementRender::DrawToDC may cause problems. Running this method modifies the device context to ensure that IHTMLElementRender::DrawToDC works properly on all printers.

 

 

Community Additions

ADD
Show:
© 2015 Microsoft