Windows API Guide: CB_RESETCONTENT Message


Declare Function CreateEllipticRgn Lib "gdi32.dll" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

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

CreateEllipticRgn creates an elliptically-shaped region. The ellipse which forms the region is specified by the bounding rectangle defined by the coordinates passed to the function. The bounding rectangle is the smallest possible rectangle which can fit around the ellipse. The function returns a handle to the newly created region if successful, or 0 if an error occured.

X1
The x-coordinate of the upper-left corner of the ellipse's bounding rectangle.
Y1
The y-coordinate of the upper-left corner of the ellipse's bounding rectangle.
X2
The x-coordinate of the lower-right corner of the ellipse's bounding rectangle.
Y2
The y-coordinate of the lower-right corner of the ellipse's bounding rectangle.

Example:

' Invert the pixels within an elliptical region on window Form1.  The ' elliptical region has a bounding rectangle of (20,30)-(150,110). Dim hrgn As Long  ' handle to the region to invert Dim retval As Long  ' return value ' Create the elliptical region to invert and get a handle to it. hrgn = CreateEllipticRgn(20,30,150,110)  ' bounding rectangle (20,30)-(150,110) ' Invert that region in window Form1. retval = InvertRgn(Form1.hDC, hrgn) ' Delete the region to free up resources. retval = DeleteObject(hrgn)

See Also: CreateEllipticRgnIndirect
Category: Regions

Go back to the alphabetical Function listing.
Go back to the Reference section index.


This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/c/createellipticrgn.html



Windows API Guide
Windows API Guide - Reference - Volume 1: Version 3.0 For the MS-DOS and PC-DOS Operating Systems
ISBN: B001V0KQIY
EAN: N/A
Year: 1998
Pages: 610

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net