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

# CreateBrushIndirect(3w)

## NAME

**CreateBrushIndirect** (GDI32.@)

## SYNOPSIS

HBRUSH CreateBrushIndirect\
  (\
   const LOGBRUSH\* *brush*\
  )

## DESCRIPTION

Create a logical *brush* with a given style, color or pattern.

## PARAMS

*brush* **\[In\]**  Pointer to a **LOGBRUSH** structure describing the desired *brush*.

## RETURNS

A handle to the created *brush*, or a **NULL** handle if the *brush* cannot be created.

## NOTES

**-** The *brush* returned should be freed by the caller using **[DeleteObject(3w)](/DeleteObject/3w.md)** when it is no longer required.

**-** Windows(tm) **95** and earlier cannot create brushes from bitmaps or DIBs larger than 8x8 pixels. If a larger bitmap is given, only a portion of the bitmap is used.

## IMPLEMENTATION

Declared in **"mfdrv/metafiledrv.h"**.

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

Debug channel **"gdi"**.
