using System; using System.Runtime.InteropServices; namespace Vanara.PInvoke { public static partial class Gdi32 { /// /// The CreateBrushIndirect function creates a logical brush that has the specified style, color, and pattern. /// /// /// A pointer to a LOGBRUSH structure that contains information about the brush. /// /// /// If the function succeeds, the return value identifies a logical brush. /// If the function fails, the return value is NULL. /// /// /// A brush is a bitmap that the system uses to paint the interiors of filled shapes. /// /// After an application creates a brush by calling CreateBrushIndirect, it can select it into any device context by calling /// the SelectObject function. /// /// /// A brush created by using a monochrome bitmap (one color plane, one bit per pixel) is drawn using the current text and background /// colors. Pixels represented by a bit set to 0 are drawn with the current text color; pixels represented by a bit set to 1 are /// drawn with the current 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. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createbrushindirect HBRUSH CreateBrushIndirect( CONST // LOGBRUSH *plbrush ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "75f94ad1-ca25-4ad1-9e8c-ad1a4b8475a7")] public static extern SafeHBRUSH CreateBrushIndirect(in LOGBRUSH plbrush); /// /// /// 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. /// /// /// /// /// 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. /// /// /// /// /// 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. /// /// /// /// /// If the function succeeds, the return value identifies a logical brush. /// If the function fails, the return value is NULL. /// /// /// /// 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. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createdibpatternbrush HBRUSH CreateDIBPatternBrush( HGLOBAL // h, UINT iUsage ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "d123ef44-e047-4188-a2bc-20e479869dc3")] [Obsolete("This function is provided only for compatibility with 16-bit versions of Windows. Applications should use the CreateDIBPatternBrushPt function.")] public static extern SafeHBRUSH CreateDIBPatternBrush(IntPtr h, DIBColorMode iUsage); /// /// /// The CreateDIBPatternBrushPt function creates a logical brush that has the pattern specified by the device-independent /// bitmap (DIB). /// /// /// /// /// A pointer to a packed DIB consisting of a BITMAPINFO structure immediately followed by an array of bytes defining the pixels of /// the bitmap. /// /// /// /// /// 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 indexes. The iUsage 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. /// /// /// /// /// If the function succeeds, the return value identifies a logical brush. /// If the function fails, the return value is NULL. /// /// /// A brush is a bitmap that the system uses to paint the interiors of filled shapes. /// /// After an application creates a brush by calling CreateDIBPatternBrushPt, it can select that brush into any device context /// by calling the SelectObject function. /// /// 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. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createdibpatternbrushpt HBRUSH CreateDIBPatternBrushPt( // const VOID *lpPackedDIB, UINT iUsage ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "0e34d108-fd35-4512-9eb3-c7710af36e95")] public static extern SafeHBRUSH CreateDIBPatternBrushPt(IntPtr lpPackedDIB, DIBColorMode iUsage); /// /// The CreateHatchBrush function creates a logical brush that has the specified hatch pattern and color. /// /// /// The hatch style of the brush. This parameter can be one of the following values. /// /// /// Value /// Meaning /// /// /// HS_BDIAGONAL /// 45-degree upward left-to-right hatch /// /// /// HS_CROSS /// Horizontal and vertical crosshatch /// /// /// HS_DIAGCROSS /// 45-degree crosshatch /// /// /// HS_FDIAGONAL /// 45-degree downward left-to-right hatch /// /// /// HS_HORIZONTAL /// Horizontal hatch /// /// /// HS_VERTICAL /// Vertical hatch /// /// /// /// /// The foreground color of the brush that is used for the hatches. To create a COLORREF color value, use the RGB macro. /// /// /// If the function succeeds, the return value identifies a logical brush. /// If the function fails, the return value is NULL. /// /// /// A brush is a bitmap that the system uses to paint the interiors of filled shapes. /// /// After an application creates a brush by calling CreateHatchBrush, it can select that brush into any device context by /// calling the SelectObject function. It can also call SetBkMode to affect the rendering of the brush. /// /// /// If an application uses a hatch brush to fill the backgrounds of both a parent and a child window with matching color, you must /// set the brush origin before painting the background of the child window. You can do this by calling the SetBrushOrgEx function. /// Your application can retrieve the current brush origin by calling the GetBrushOrgEx function. /// /// When you no longer need the brush, call the DeleteObject function to delete it. /// /// ICM: No color is defined at brush creation. However, color management is performed when the brush is selected into an /// ICM-enabled device context. /// /// Examples /// /// The following example creates a logical brush that has the specified hatch pattern and color. You can also set a hatch brush /// background to transparent or to opaque. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createhatchbrush HBRUSH CreateHatchBrush( int iHatch, // COLORREF color ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "0b5849d6-1e22-4ac5-980c-2f2a73b16adb")] public static extern SafeHBRUSH CreateHatchBrush(HatchStyle iHatch, COLORREF color); /// /// /// The CreatePatternBrush function creates a logical brush with the specified bitmap pattern. The bitmap can be a DIB section /// bitmap, which is created by the CreateDIBSection function, or it can be a device-dependent bitmap. /// /// /// /// A handle to the bitmap to be used to create the logical brush. /// /// /// If the function succeeds, the return value identifies a logical brush. /// If the function fails, the return value is NULL. /// /// /// A pattern brush is a bitmap 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 SelectObject function. /// /// /// You can delete a pattern brush without affecting the associated bitmap by using the DeleteObject function. 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. /// /// /// ICM: No color is done at brush creation. However, color management is performed when the brush is selected into an /// ICM-enabled device context. /// /// Examples /// For an example, see Using Brushes. /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createpatternbrush HBRUSH CreatePatternBrush( HBITMAP hbm ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "a3cf347e-9803-4bb0-bdb3-98929ef859ab")] public static extern SafeHBRUSH CreatePatternBrush(HBITMAP hbm); /// /// The CreateSolidBrush function creates a logical brush that has the specified solid color. /// /// /// The color of the brush. To create a COLORREF color value, use the RGB macro. /// /// /// If the function succeeds, the return value identifies a logical brush. /// If the function fails, the return value is NULL. /// /// /// When you no longer need the HBRUSH object, call the DeleteObject function to delete it. /// A solid brush is a bitmap that the system uses to paint the interiors of filled shapes. /// /// After an application creates a brush by calling CreateSolidBrush, it can select that brush into any device context by /// calling the SelectObject function. /// /// /// To paint with a system color brush, an application should use instead of , because GetSysColorBrush returns a cached brush /// instead of allocating a new one. /// /// /// ICM: No color management is done at brush creation. However, color management is performed when the brush is selected into /// an ICM-enabled device context. /// /// Examples /// For an example, see Creating Colored Pens and Brushes. /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-createsolidbrush HBRUSH CreateSolidBrush( COLORREF color ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "e39b5f77-97d8-4ea6-8277-7da12b3367f3")] public static extern SafeHBRUSH CreateSolidBrush(COLORREF color); /// /// /// The GetBrushOrgEx function retrieves the current brush origin for the specified device context. This function replaces the /// GetBrushOrg function. /// /// /// /// A handle to the device context. /// /// /// A pointer to a POINT structure that receives the brush origin, in device coordinates. /// /// /// If the function succeeds, the return value is nonzero. /// If the function fails, the return value is zero. /// /// /// A brush is a bitmap that the system uses to paint the interiors of filled shapes. /// /// The brush origin is a set of coordinates with values between 0 and 7, specifying the location of one pixel in the bitmap. The /// default brush origin coordinates are (0,0). For horizontal coordinates, the value 0 corresponds to the leftmost column of pixels; /// the value 7 corresponds to the rightmost column. For vertical coordinates, the value 0 corresponds to the uppermost row of /// pixels; the value 7 corresponds to the lowermost row. When the system positions the brush at the start of any painting operation, /// it maps the origin of the brush to the location in the window's client area specified by the brush origin. For example, if the /// origin is set to (2,3), the system maps the origin of the brush (0,0) to the location (2,3) on the window's client area. /// /// /// If an application uses a brush to fill the backgrounds of both a parent and a child window with matching colors, it may be /// necessary to set the brush origin after painting the parent window but before painting the child window. /// /// /// The system automatically tracks the origin of all window-managed device contexts and adjusts their brushes as necessary to /// maintain an alignment of patterns on the surface. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-getbrushorgex BOOL GetBrushOrgEx( HDC hdc, LPPOINT lppt ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "0b938237-cb06-4776-86f8-14478abcee00")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool GetBrushOrgEx(HDC hdc, out POINT lppt); /// /// /// The PatBlt function paints the specified rectangle using the brush that is currently selected into the specified device /// context. The brush color and the surface color or colors are combined by using the specified raster operation. /// /// /// /// A handle to the device context. /// /// /// The x-coordinate, in logical units, of the upper-left corner of the rectangle to be filled. /// /// /// The y-coordinate, in logical units, of the upper-left corner of the rectangle to be filled. /// /// /// The width, in logical units, of the rectangle. /// /// /// The height, in logical units, of the rectangle. /// /// /// The raster operation code. This code can be one of the following values. /// /// /// Value /// Meaning /// /// /// PATCOPY /// Copies the specified pattern into the destination bitmap. /// /// /// PATINVERT /// Combines the colors of the specified pattern with the colors of the destination rectangle by using the Boolean XOR operator. /// /// /// DSTINVERT /// Inverts the destination rectangle. /// /// /// BLACKNESS /// /// Fills the destination rectangle using the color associated with index 0 in the physical palette. (This color is black for the /// default physical palette.) /// /// /// /// WHITENESS /// /// Fills the destination rectangle using the color associated with index 1 in the physical palette. (This color is white for the /// default physical palette.) /// /// /// /// /// /// If the function succeeds, the return value is nonzero. /// If the function fails, the return value is zero. /// /// /// /// The values of the dwRop parameter for this function are a limited subset of the full 256 ternary raster-operation codes; in /// particular, an operation code that refers to a source rectangle cannot be used. /// /// /// Not all devices support the PatBlt function. For more information, see the description of the RC_BITBLT capability in the /// GetDeviceCaps function. /// /// Examples /// For an example, see "Example of Menu-Item Bitmaps" in Using Menus. /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-patblt BOOL PatBlt( HDC hdc, int x, int y, int w, int h, // DWORD rop ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "6deea8ef-b55d-4086-a54e-3f89bb17c6cd")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool PatBlt(HDC hdc, int x, int y, int w, int h, RasterOperationMode rop); /// /// /// The SetBrushOrgEx function sets the brush origin that GDI assigns to the next brush an application selects into the /// specified device context. /// /// /// /// A handle to the device context. /// /// /// /// The x-coordinate, in device units, of the new brush origin. If this value is greater than the brush width, its value is reduced /// using the modulus operator (nXOrg mod brush width). /// /// /// /// /// The y-coordinate, in device units, of the new brush origin. If this value is greater than the brush height, its value is reduced /// using the modulus operator (nYOrg mod brush height). /// /// /// /// A pointer to a POINT structure that receives the previous brush origin. /// This parameter can be NULL if the previous brush origin is not required. /// /// /// If the function succeeds, the return value is nonzero. /// If the function fails, the return value is zero. /// /// /// A brush is a bitmap that the system uses to paint the interiors of filled shapes. /// /// The brush origin is a pair of coordinates specifying the location of one pixel in the bitmap. The default brush origin /// coordinates are (0,0). For horizontal coordinates, the value 0 corresponds to the leftmost column of pixels; the width /// corresponds to the rightmost column. For vertical coordinates, the value 0 corresponds to the uppermost row of pixels; the height /// corresponds to the lowermost row. /// /// /// The system automatically tracks the origin of all window-managed device contexts and adjusts their brushes as necessary to /// maintain an alignment of patterns on the surface. The brush origin that is set with this call is relative to the upper-left /// corner of the client area. /// /// /// An application should call SetBrushOrgEx after setting the bitmap stretching mode to HALFTONE by using SetStretchBltMode. /// This must be done to avoid brush misalignment. /// /// /// The system automatically tracks the origin of all window-managed device contexts and adjusts their brushes as necessary to /// maintain an alignment of patterns on the surface. /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-setbrushorgex BOOL SetBrushOrgEx( HDC hdc, int x, int y, // LPPOINT lppt ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "dcc7575a-49fd-4306-8baa-57e9e0d5ed1f")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool SetBrushOrgEx(HDC hdc, int x, int y, in POINT lppt); /// /// SetDCBrushColor function sets the current device context (DC) brush color to the specified color value. If the device /// cannot represent the specified color value, the color is set to the nearest physical color. /// /// A handle to the DC. /// The new brush color. /// /// If the function succeeds, the return value specifies the previous DC brush color as a COLORREF value. /// If the function fails, the return value is CLR_INVALID. /// /// /// /// When the stock DC_BRUSH is selected in a DC, all the subsequent drawings will be done using the DC brush color until the stock /// brush is deselected. The default DC_BRUSH color is WHITE. /// /// /// The function returns the previous DC_BRUSH color, even if the stock brush DC_BRUSH is not selected in the DC: however, this will /// not be used in drawing operations until the stock DC_BRUSH is selected in the DC. /// /// /// The GetStockObject function with an argument of DC_BRUSH or DC_PEN can be used interchangeably with the SetDCPenColor and /// SetDCBrushColor functions. /// /// ICM: Color management is performed if ICM is enabled. /// Examples /// For an example of setting colors, see Setting the Pen or Brush Color. /// // https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-setdcbrushcolor // COLORREF SetDCBrushColor( HDC hdc, COLORREF color ); [DllImport(Lib.Gdi32, SetLastError = false, ExactSpelling = true)] [PInvokeData("wingdi.h", MSDNShortId = "4feed536-2f1d-4a25-8311-7cae303167ca")] public static extern COLORREF SetDCBrushColor(HDC hdc, COLORREF color); /// /// The LOGBRUSH structure defines the style, color, and pattern of a physical brush. It is used by the CreateBrushIndirect /// and ExtCreatePen functions. /// /// /// Although lbColor controls the foreground color of a hatch brush, the SetBkMode and SetBkColor functions control the /// background color. /// // https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-taglogbrush typedef struct tagLOGBRUSH { UINT lbStyle; // COLORREF lbColor; ULONG_PTR lbHatch; } LOGBRUSH, *PLOGBRUSH, *NPLOGBRUSH, *LPLOGBRUSH; [PInvokeData("wingdi.h", MSDNShortId = "ded2c7a4-2248-4d01-95c6-ab4050719094")] [StructLayout(LayoutKind.Explicit)] public struct LOGBRUSH { /// /// 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. For more information, see discussion in lbHatch. /// /// /// /// BS_DIBPATTERN8X8 /// See 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. For more information, see discussion in lbHatch. /// /// /// /// 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 /// See BS_PATTERN. /// /// /// BS_SOLID /// Solid brush. /// /// /// [FieldOffset(0)] public BrushStyle lbStyle; /// /// /// 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_DIBPATTERNPT, the low-order word of lbColor specifies whether the /// bmiColors members of the BITMAPINFO structure contain explicit red, green, blue (RGB) values or indexes 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 indexes into the currently realized logical palette. /// /// /// DIB_RGB_COLORS /// The color table contains literal RGB values. /// /// /// /// If lbStyle is BS_HATCHED or BS_SOLID, lbColor is a COLORREF color value. To create a COLORREF color /// value, use the RGB macro. /// /// [FieldOffset(4)] public COLORREF lbColor; /// /// 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. To obtain this handle, an /// application calls the GlobalAlloc function with GMEM_MOVEABLE (or LocalAlloc with LMEM_MOVEABLE) to allocate a block of /// memory and then fills the memory with the packed DIB. A packed DIB consists of a BITMAPINFO structure immediately followed by /// the array of bytes that define the pixels of the bitmap. /// /// /// If lbStyle is BS_DIBPATTERNPT, the lbHatch member contains a pointer to a packed DIB. The pointer derives from /// the memory block created by LocalAlloc with LMEM_FIXED set or by GlobalAlloc with GMEM_FIXED set, or it is the pointer /// returned by a call like LocalLock (handle_to_the_dib). A packed DIB consists of a BITMAPINFO structure immediately followed /// by the array of bytes that define the pixels of the bitmap. /// /// /// 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. /// [FieldOffset(8)] public HatchStyle lbHatchStyle; /// /// 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. To obtain this handle, an /// application calls the GlobalAlloc function with GMEM_MOVEABLE (or LocalAlloc with LMEM_MOVEABLE) to allocate a block of /// memory and then fills the memory with the packed DIB. A packed DIB consists of a BITMAPINFO structure immediately followed by /// the array of bytes that define the pixels of the bitmap. /// /// /// If lbStyle is BS_DIBPATTERNPT, the lbHatch member contains a pointer to a packed DIB. The pointer derives from /// the memory block created by LocalAlloc with LMEM_FIXED set or by GlobalAlloc with GMEM_FIXED set, or it is the pointer /// returned by a call like LocalLock (handle_to_the_dib). A packed DIB consists of a BITMAPINFO structure immediately followed /// by the array of bytes that define the pixels of the bitmap. /// /// /// 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. /// [FieldOffset(8)] public IntPtr lbHatch; } } }