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.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("GDI32.dll", SetLastError := true>]
Public Shared Function CreateSolidBrush (
color As UInteger
) As IntPtr
Dim color As UInteger
Dim returnValue As IntPtr
returnValue = Gdi32.CreateSolidBrush(color)
public:
[DllImportAttribute(L"GDI32.dll", SetLastError = true)]
static IntPtr CreateSolidBrush(
unsigned int color
)
[<DllImportAttribute("GDI32.dll", SetLastError = true)>]
static member CreateSolidBrush :
color : uint32 -> IntPtr
No code example is currently available or this language may not be supported.
- color UInt32
-
The color of the brush.
To create a COLORREF color value, use the RGB macro.
IntPtr
If the function succeeds, the return value identifies a logical brush.
If the function fails, the return value is
Zero.