The answer is to use Regions.

search the WinAPI help on

CreatePolyPolygonRgn

and

SetWindowRgn


Wes Edwards
CommSoft Group Limited
ph:+64 9 358 5900 fax:+64 9 358 5901
[EMAIL PROTECTED]

SmartCharge ... on every switch


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Tom Munro Glass
> Sent: Tuesday, 20 July 1999 21:37
> To: Multiple recipients of list delphi
> Subject: [DUG]: How to draw a non-rectangular control?
> 
> 
> I'm trying to develop a button-like control which can be 
> rotated, and I need
> to be able to stack a number of these controls next to each 
> other like a
> sort of rotated toolbar.
> 
> The Paint method uses Canvas.Polygon to draw the rotated 
> rectangular button,
> but the overall control window is being erased and is 
> overwriting adjacent
> controls. How can I draw this non-rectangular control without touching
> anything outside the area of my polygon?
> 
> TRotateButton is derived from TCustomControl.
> 
> Thanks in advance.
> 
> ==================================================================
> 
> Tom Munro Glass
> 
> +----------------------------------------------------------------+
> | E-mail:                                                        |
> |     Internet:           [EMAIL PROTECTED]                         |
> | Web sites:                                                     |
> |     TMG CONSULTANCY:    http://www.tmgcon.com                  |
> |     Tewkesbury Web:     http://www.tmgcon.com/tewksweb         |
> +----------------------------------------------------------------+
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> 
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to