Microsoft Windows CE 3.0  

CreatePatternBrush

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function creates a logical brush with the specified bitmap pattern.

HBRUSH CreatePatternBrush( HBITMAP
hbmp
);

Parameters

hbmp
[in] Handle to the bitmap to be used to create the logical brush.

Return Values

A handle that identifies a logical brush indicates success. NULL indicates failure. To get extended error information, call GetLastError.

Remarks

A pattern brush is a bitmap, which can be of an arbitrary size, that the system uses to paint the interiors of filled shapes.

After an application creates a brush by calling CreatePatternBrush, it can select that brush into any device context by calling the SelectObjectfunction.

You can delete a pattern brush without affecting the associated bitmap by using the DeleteObjectfunction. Therefore, you can then use this bitmap to create any number of pattern brushes.

A brush created by using a monochrome (1 bit per pixel) bitmap has the text and background colors of the device context to which it is drawn. Pixels represented by a 0 bit are drawn with the current text color; pixels represented by a 1 bit are drawn with the current background color.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Wingdi.h   Mgdraw.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CreateDibSection, DeleteObject, GetLastError, SelectObject