|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| -
| Header File
| wingdi.h
| Unicode
| No
| Platform Notes
| None
|
|
|
LOGBRUSH
The LOGBRUSH structure defines the style, color, and pattern of a physical brush. It is
used by the CreateBrushIndirect and ExtCreatePen functions.
typedef struct tagLOGBRUSH { // lb
UINT lbStyle;
COLORREF lbColor;
LONG lbHatch;
} LOGBRUSH;
Members
lbStyle
Specifies the brush style. The lbStyle member must be one of the following styles:
Value
| Meaning
| BS_DIBPATTERN
| A pattern brush defined by a device-independent bitmap (DIB) specification. If lbStyle is BS_DIBPATTERN, the lbHatch member contains a handle to a packed DIB.
Windows 95: Creating brushes from bitmaps or DIBs larger than 8x8 pixels is not
supported. If a larger bitmap is given, only a portion of the bitmap is used.
| BS_DIBPATTERN8X8
| Same as BS_DIBPATTERN.
| BS_DIBPATTERNPT
| A pattern brush defined by a device-independent bitmap (DIB) specification. If lbStyle is BS_DIBPATTERNPT, the lbHatch member contains a pointer to a packed DIB.
| BS_HATCHED
| Hatched brush.
| BS_HOLLOW
| Hollow brush.
| BS_NULL
| Same as BS_HOLLOW.
| BS_PATTERN
| Pattern brush defined by a memory bitmap.
| BS_PATTERN8X8
| Same as BS_PATTERN.
| BS_SOLID
| Solid brush.
|
lbColor
Specifies the color in which the brush is to be drawn. If lbStyle is the BS_HOLLOW or BS_PATTERN style, lbColor is ignored.
If lbStyle is BS_DIBPATTERN or BS_DIBPATTERNBT, the low-order word of lbColor specifies whether the bmiColors members of the BITMAPINFO structure contain explicit red, green, blue (RGB) values or indices into the
currently realized logical palette. The lbColor member must be one of the following values:
Value
| Meaning
| DIB_PAL_COLORS
| The color table consists of an array of 16-bit indices into the currently
realized logical palette.
| DIB_RGB_COLORS
| The color table contains literal RGB values.
|
lbHatch
Specifies a hatch style. The meaning depends on the brush style defined by lbStyle.
If lbStyle is BS_DIBPATTERN, the lbHatch member contains a handle to a packed DIB. If lbStyle is BS_DIBPATTERNPT, the lbHatch member contains a pointer to a packed DIB.
If lbStyle is BS_HATCHED, the lbHatch member specifies the orientation of the lines used to create the hatch. It
can be one of the following values:
Value
| Meaning
| HS_BDIAGONAL
| A 45-degree upward, left-to-right hatch
| HS_CROSS
| Horizontal and vertical cross-hatch
| HS_DIAGCROSS
| 45-degree crosshatch
| HS_FDIAGONAL
| A 45-degree downward, left-to-right hatch
| HS_HORIZONTAL
| Horizontal hatch
| HS_VERTICAL
| Vertical hatch
|
If lbStyle is BS_PATTERN, lbHatch is a handle to the bitmap that defines the pattern. The bitmap cannot be a
DIB section bitmap, which is created by the CreateDIBSection function.
If lbStyle is BS_SOLID or BS_HOLLOW, lbHatch is ignored.
Remarks
Although lbColor controls the foreground color of a hatch brush, the SetBkMode and SetBkColor functions control the background color.
See Also
BITMAPINFO, CreateBrushIndirect, CreateDIBSection, ExtCreatePen, SetBkColor, SetBkMode
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|