Gdi::CreateDIBPatternBrushPt_I (Windows Embedded CE 6.0)
1/6/2010
This method creates a logical brush that has the pattern specified by the device-independent bitmap (DIB).
Syntax
static WINGDIAPI HBRUSH WINAPI CreateDIBPatternBrushPt_I(
const void* lpPackedDIB,
unsigned int iUsage
);
Parameters
- lpPackedDIB
[in] Long pointer to a packed DIB that consists of a BITMAPINFO structure immediately followed by an array of bytes that define the pixels of the bitmap.
iUsage
[in] Unsigned integer that specifies whether the bmiColors member of the BITMAPINFO structure contains a valid color table and, if so, whether the entries in this color table contain explicit red, green, blue (RGB) values or palette indices.The following table shows the possible values.
Value Description DIB_PAL_COLORS
A color table is provided and consists of an array of 16-bit indices 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.
Set the iUsage parameter to DIB_RGB_COLORS. When you use an 8 bits per pixel (bpp) bitmap, you can set iUsage to DIB_PAL_COLORS.
In that case, however, Windows Embedded CE ignores the values in the bmiColors array member of the BITMAPINFO structure.
Return Value
Handle to a logical brush indicates success. NULL indicates failure. To get extended error information, call GetLastError.
Remarks
This method is an internal version of the CreateDIBPatternBrushPt function.
A brush is a bitmap that the system uses to paint the interiors of filled shapes.
After an application creates a brush by calling Gdi::CreateDIBPatternBrushPt_I, the application can select that brush into any device context by calling the Gdi::SelectObject_I method.
When you no longer need the brush, call the Gdi::DeleteObject_I method to delete the brush.
Requirements
Header | gdi.hpp |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Gdi
CreateDIBPatternBrushPt
Gdi::CreateSolidBrush_I
Gdi::DeleteObject_I
Gdi::SelectObject_I
Gdi::SetBrushOrgEx_I
BITMAPINFO