Windows API Guide: CB_SETCURSEL Message


Declare Function CreateEllipticRgnIndirect Lib "gdi32.dll" (lpRect As RECT) 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 rectangle structure 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.

lpRect
The bounding rectangle of the ellipse which forms the region.

Example:

' Invert the pixels within an elliptical region within window Form1.  The ' elliptical region has a bounding rectangle of (20,30)-(150,110) Dim hrgn As Long  ' handle to the elliptical region Dim bounding As RECT ' bounding rectangle Dim retval As Long  ' return value ' Load the coordinates of the bounding rectangle into the structure. retval = SetRect(bounding, 20, 30, 150, 110)  ' bounding = (20,30)-(150,110) ' Create the elliptical region from this bounding rectangle. hrgn = CreateEllipticRgnIndirect(bounding) ' Invert the pixels on Form1 within the region. retval = InvertRgn(Form1.hDC, hrgn) ' Delete the region to free up resources. retval = DeleteObject(hrgn)

See Also: CreateEllipticRgn
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/createellipticrgnindirect.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