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

TWidgetSet.DrawFocusRect

Shows or hides a focus 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 a canvas, e.g. a rectangular selection following mouse moves (rubber banding box, DockRect).

A second call of the function, with the same parameters, removes the rectangle (XOR painting). Due to this behavior 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.

Version 4.0 Generated 2025-05-03 Home