Sign in Join
FPDoc Onlineexperiment

TCustomControl.PaintWindow procedure

Member of TCustomControlprotectedIn unit Controls

The Paint handler plug-in, intercepting paint requests.

Declaration

pascal
procedure PaintWindow(DC: HDC); override

Arguments

DC

The Device Context used to draw on the Canvas.

Description

PaintWindow is an overridden method in TCustomControl. It ensures that Canvas has an allocated Handle which matches the device context specified in the DC argument. If the Canvas handle does not match DC, the value in the argument is assigned to Canvas.

PaintWindow calls the Paint method to signal the OnPaint event handler (when assigned).

If Handle value in Canvas was changed in the method, it is reset to 0 (unassigned) prior to exit.

PaintWindow does not call the inherited method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.