GetCanvasDC
Vector graphics, Document management
Description
Creates a canvas of the specified size and returns a Windows device context DC that can be drawn on using Win32 drawing commands. When drawing operations are complete, call the LoadFromCanvasDC function to create a new document from the supplied drawing commands.
The return value is a Windows device context handle declared as HDC, which keeps 64-bit handles from being sign-extended.
Syntax
Delphi
Function TPDFlib.GetCanvasDC(CanvasWidth, CanvasHeight: Integer): HDC;
ActiveX
Function PDFlib::GetCanvasDC(CanvasWidth As Long, CanvasHeight As Long) As Long
DLL
HDC DLGetCanvasDC(int InstanceID, int CanvasWidth, int CanvasHeight);
Parameters
| CanvasWidth | The width of the canvas |
|---|---|
| CanvasHeight | The height of the canvas |
Return values
Returns the device context handle of a fresh metafile canvas, or 0 when CanvasWidth or CanvasHeight is not positive