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

# SelectObject(3w)

## NAME

**SelectObject** (GDI32.@)

## SYNOPSIS

HGDIOBJ SelectObject\
  (\
   HDC     *hdc*,\
   HGDIOBJ *hObj*\
  )

## DESCRIPTION

Select a Gdi object into a device context.

## PARAMS

*hdc* **\[In\]**  Device context to associate the object with.

*hObj* **\[In\]**  Gdi object to associate with *hdc*.

## RETURNS

**Success:** A non-NULL handle representing the previously selected object of the same type as *hObj*.

**Failure:** A **NULL** object. If *hdc* is invalid, **[GetLastError(3w)](/GetLastError/3w.md)** returns **ERROR\_INVALID\_HANDLE**. if *hObj* is not a valid object handle, no last error is set. In either case, *hdc* is unaffected by the call.

## IMPLEMENTATION

Declared in **"gdi\_private.h"**.

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

Debug channel **"gdi"**.
