Skip to content

Latest commit

 

History

History
150 lines (100 loc) · 5.03 KB

nf-wingdi-createdibpatternbrush.md

File metadata and controls

150 lines (100 loc) · 5.03 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wingdi.CreateDIBPatternBrush
CreateDIBPatternBrush function (wingdi.h)
The CreateDIBPatternBrush function creates a logical brush that has the pattern specified by the specified device-independent bitmap (DIB).
CreateDIBPatternBrush
CreateDIBPatternBrush function [Windows GDI]
DIB_PAL_COLORS
DIB_RGB_COLORS
_win32_CreateDIBPatternBrush
gdi.createdibpatternbrush
wingdi/CreateDIBPatternBrush
gdi\createdibpatternbrush.htm
gdi
d123ef44-e047-4188-a2bc-20e479869dc3
12/05/2018
CreateDIBPatternBrush, CreateDIBPatternBrush function [Windows GDI], DIB_PAL_COLORS, DIB_RGB_COLORS, _win32_CreateDIBPatternBrush, gdi.createdibpatternbrush, wingdi/CreateDIBPatternBrush
wingdi.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Gdi32.lib
Gdi32.dll
Windows
19H1
CreateDIBPatternBrush
wingdi/CreateDIBPatternBrush
c++
APIRef
kbSyntax
DllExport
gdi32.dll
Ext-MS-Win-GDI-Internal-Desktop-L1-1-0.dll
GDI32Full.dll
CreateDIBPatternBrush

CreateDIBPatternBrush function

-description

The CreateDIBPatternBrush function creates a logical brush that has the pattern specified by the specified device-independent bitmap (DIB). The brush can subsequently be selected into any device context that is associated with a device that supports raster operations.

Note  This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the CreateDIBPatternBrushPt function.
 

-parameters

-param h [in]

A handle to a global memory object containing a packed DIB, which consists of a BITMAPINFO structure immediately followed by an array of bytes defining the pixels of the bitmap.

-param iUsage [in]

Specifies whether the bmiColors member of the BITMAPINFO structure is initialized and, if so, whether this member contains explicit red, green, blue (RGB) values or indexes into a logical palette. The fuColorSpec parameter must be one of the following values.

Value Meaning
DIB_PAL_COLORS
A color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the brush is to be selected.
DIB_RGB_COLORS
A color table is provided and contains literal RGB values.

-returns

If the function succeeds, the return value identifies a logical brush.

If the function fails, the return value is NULL.

-remarks

When an application selects a two-color DIB pattern brush into a monochrome device context, the system does not acknowledge the colors specified in the DIB; instead, it displays the pattern brush using the current background and foreground colors of the device context. Pixels mapped to the first color of the DIB (offset 0 in the DIB color table) are displayed using the foreground color; pixels mapped to the second color (offset 1 in the color table) are displayed using the background color.

When you no longer need the brush, call the DeleteObject function to delete it.

ICM: No color is done at brush creation. However, color management is performed when the brush is selected into an ICM-enabled device context.

-see-also

BITMAPINFO

Brush Functions

Brushes Overview

CreateDIBPatternBrushPt

CreateHatchBrush

CreatePatternBrush

CreateSolidBrush

DeleteObject

SetBkColor

SetTextColor