[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TWinControl.PaintTo

Paints the control using the handle for the widgetset class.

## Declaration

Source position: controls.pp line 2437

`public procedure TWinControl.PaintTo(`
`DC: HDC;`
`X: Integer;`
`Y: Integer`
`); virtual; overload; procedure TWinControl.PaintTo(`
`ACanvas: TCanvas;`
`X: Integer;`
`Y: Integer`
`); overload;`

## Arguments

`DC` |  | Device context (or Handle) used for the operation.
`X` |  | Horizontal coordinate where the control is drawn.
`Y` |  | Vertical coordinate where the control is drawn.

## Arguments

`ACanvas` |  | TCanvas instance with the handle used in the operation.
`X` |  | Horizontal coordinate where the control is drawn.
`Y` |  | Vertical coordinate where the control is drawn.

## Description

PaintTo is a procedure used to draw the control using the handle for the widgetset class. An overloaded variant is provided which uses the handle in a TCanvas instance as the target for the drawing operation.