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

# CreateHatchBrush(3w)

## NAME

**CreateHatchBrush** (GDI32.@)

## SYNOPSIS

HBRUSH CreateHatchBrush\
  (\
   INT      *style*,\
   COLORREF *color*\
  )

## DESCRIPTION

Create a logical brush with a hatched pattern.

## PARAMS

*style* **\[In\]**  Direction of lines for the hatch pattern (**HS\_**\* values from **"wingdi.h"**).

*color* **\[In\]**  Colour of the hatched pattern.

## RETURNS

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

## NOTES

**-** This function uses **[CreateBrushIndirect(3w)](/CreateBrushIndirect/3w.md)** to create the brush.

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

## IMPLEMENTATION

Declared in **"gdiplusflat.h"**.

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

Debug channel **"gdi"**.
