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

# TWidgetSet.GetCurrentObject

Returns the currently selected object in a device context.

## Declaration

Source position: winapih.inc line 120

`public function TWidgetSet.GetCurrentObject(`
`DC: HDC;`
`uObjectType: UINT`
`):HGDIOBJ; virtual;`

## Arguments

`DC` |  | The device context.
`uObjectType` |  | The type of the selected object, e.g. OBJ_BRUSH.

## Function result

The object handle, zero on failure.