Gdi32CreateSolidBrush Method

Creates a logical brush that has the specified solid color.

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(UInt32), it can select that brush into any device context by calling the SelectObject(IntPtr, IntPtr) function.

When you no longer need the brush, call the DeleteObject(IntPtr) function to delete it.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll", SetLastError = true)]
public static IntPtr CreateSolidBrush(
	uint color
)

Parameters

color  UInt32
The color of the brush.

To create a COLORREF color value, use the RGB macro.

Return Value

IntPtr
If the function succeeds, the return value identifies a logical brush.

If the function fails, the return value is Zero.

Remarks

See Also