Gdi::FillRect_I (Windows Embedded CE 6.0)
1/6/2010
This method fills a rectangle using the specified brush. This method fills the left and top borders of the rectangle, but excludes the right and bottom borders.
Syntax
static WINUSERAPI int WINAPI FillRect_I(
HDC hDC,
CONST RECT* lprc,
HBRUSH hbr
);
Parameters
- hDC
[in] Handle to the device context.
- lprc
[in] Long pointer to a RECT structure that contains the logical coordinates of the rectangle to be filled.
- hbr
[in] Handle to the brush used to fill the rectangle.
Return Value
Nonzero indicates success.
Zero indicates failure.
To get extended error information, call GetLastError.
Remarks
This method is an internal version of the FillRect function.
The brush identified by the hbr parameter can be either a handle to a logical brush or a color value.
If specifying a handle to a logical brush, call Gdi::CreatePatternBrush_I or Gdi::CreateSolidBrush_I to obtain the handle. Additionally, you can retrieve a handle to one of the stock brushes by using the GetStockObject function.
If specifying a color value for the hbr parameter, the value must be one of the standard system colors, and you must add 1 to the chosen color.
The following code example shows how to specify a color value.
Gdi::FillRect_I(hdc, &rect, (HBRUSH) (COLOR_ENDCOLORS+1));
For a list of all the standard system colors, see GetSysColor.
When filling the specified rectangle, Gdi::FillRect_I does not include the right and bottom sides of the rectangle.
GDI fills a rectangle up to, but not including, the right column and bottom row, regardless of the current mapping mode.
Requirements
Header | gdi.hpp |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Gdi
FillRect
GetStockObject
GetSysColor
Gdi::CreatePatternBrush_I
Gdi::CreateSolidBrush_I
RECT