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

TWidgetSet.DrawFocusRect

Shows or hides a floating rectangle.

Declaration

Source position: winapih.inc line 83

public function TWidgetSet.DrawFocusRect(

  DC: HDC;

  const Rect: TRect

):Boolean; virtual;

Arguments

DC

  

Almost a screen DC.

Function result

False on failure.

Description

This function is intended to temporarily outline part of an canvas, e.g. a rectangular selection following mouse moves (rubber box, DockRect).

A second call of the function, with the same parameters, removes the rectangle again (XOR painting). Due to this behaviour the frame should be removed before it might be overwritten by any other painting operation.

Remark: Not all platforms allow for painting outside WM_PAINT events.
Remark: Child windows may be excluded (clipped), i.e. the rectangle is not necessarily fully shown.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.