---
name: "GetCurrentObject"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GetCurrentObject"
---

# GetCurrentObject(3w)

## NAME

**GetCurrentObject** (GDI32.@)

## SYNOPSIS

HGDIOBJ GetCurrentObject\
  (\
   HDC  *hdc*,\
   UINT *type*\
  )

## DESCRIPTION

Get the currently selected object of a given *type* in a device context.

## PARAMS

*hdc* **\[In\]**  Device context to get the current object from.

*type* **\[In\]**  Type of current object to get (**OBJ\_**\* defines from **"wingdi.h"**).

## RETURNS

**Success:** The current object of the given *type* selected in *hdc*.

**Failure:** A **NULL** handle.

## NOTES

**-** only the following object types are supported: \
\
  OBJ\_PEN\
\
  OBJ\_BRUSH\
\
  OBJ\_PAL\
\
  OBJ\_FONT\
\
  OBJ\_BITMAP

## IMPLEMENTATION

Declared in **"wingdi.h"**.

Implemented in **"dlls/gdi32/gdiobj.c"**.

Debug channel **"gdi"**.
