SetRectEmpty Function

Declare Function SetRectEmpty Lib "user32.dll" (lpRect As RECT) As Long

Platforms: Win 32s, Win 95/98, Win NT

SetRectEmpty sets a rectangle to an empty state. An empty rectangle is one that has a nonpositive width and/or height. In this case, Windows sets the rectangle to (0,0)-(0,0). The function returns 0 if an error occured, or 1 if successful.

lpRect
The rectangle to set as empty.

Example:

' Set rectangle r to empty.  Note this is much easier than manually
' setting its four member values to 0 individually.
Dim r As RECT  ' the rectangle to make empty
Dim retval As Long  ' return value

retval = SetRectEmpty(r)  ' r now equals (0,0)-(0,0)

Related Calls: IsRectEmpty, SetRect
Category: Rectangles
Back to the index.


Go to Paul Kuliniewicz's Home Page.
E-mail: rogue953@hotmail.com
This page is at http://skyscraper.fortunecity.com/transmission/45/api/s/setrectempty.html