Share via


Gdi::CreatePatternBrush_I (Windows CE 5.0)

Send Feedback

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

static WINGDIAPI HBRUSH WINAPI CreatePatternBrush_I(HBITMAP hbmp);

Parameters

  • hbmp
    [in] Handle to the bitmap that you want to use 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

This method is an internal version of the CreatePatternBrush function.

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 Gdi::CreatePatternBrush_I, the application can select that brush into any device context by calling the Gdi::SelectObject_I method.

You can delete a pattern brush without affecting the associated bitmap by using the Gdi::DeleteObject_I method. Therefore, you can 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 the bitmap 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

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

Gdi | CreateDIBSection | CreatePatternBrush | Gdi::DeleteObject_I | Gdi::SelectObject_I

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.