Share via


CreateSolidBrush

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function creates a logical brush that has the specified solid color.

Syntax

HBRUSH CreateSolidBrush( 
  COLORREF crColor
); 

Parameters

  • crColor
    [in] Specifies the color of the brush.

Return Value

A handle that identifies a logical brush indicates success.

NULL indicates failure.

To get extended error information, call GetLastError.

Remarks

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.

Windows Embedded CE does not support dithered brushes.

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

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

SelectObject
DeleteObject
GDI Functions