Partager via


Gdi::Rectangle_I (Windows Embedded CE 6.0)

1/6/2010

This method draws a rectangle. The current pen outlines the rectangle and the current brush fills the rectangle.

Syntax

static WINGDIAPI BOOL WINAPI Rectangle_I(
  HDC hdc, 
  int nLeftRect, 
  int nTopRect, 
  int nRightRect, 
  int nBottomRect
);

Parameters

  • hdc
    [in] Handle to the device context.
  • nLeftRect
    [in] Integer that specifies the logical x-coordinate of the upper left corner of the rectangle.
  • nTopRect
    [in] Integer that specifies the logical y-coordinate of the upper left corner of the rectangle.
  • nRightRect
    [in] Integer that specifies width of the rectangle.
  • nBottomRect
    [in] Integer that specifies height of 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 Rectangle function.

Gdi::Rectangle_I neither uses nor updates the current position.

Gdi::Rectangle_I does not draw the extreme bottom and right edges of rectangle because the bottom and right coordinates are treated as the width and height respectively of the rectangle instead of as the edges of the rectangle.

Requirements

Header gdi.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Gdi
Rectangle
Gdi::RoundRect_I