🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7398

About Polygon Region forms

#7398
From: Vladimir Stefanovic
Date: Thu, 03 Feb 2005 10:11
37 lines
1742 bytes
Hi,

I made 'my' version of balloon form (for some inplace tips). The
form is in fact a rectangle (for showing message) with adition of
the direction rectangle (if that is called) which points to a hot spot.

All that is made with API:
   CreatePolygonRgn()
... and 8 points, something like:

   // ...
   HRGN hRgn = CreatePolygonRgn( &pts[0], 8, ALTERNATE );
   if ( hRgn )
   {
      if ( !SetWindowRgn ( Handle, hRgn, true ) )
         DeleteObject(hRgn);
   }

   // ...

Now, I'm interested what technique can I use to make the
corners rounded (like in XP)?

Should I use some math formulas to calculate additional points
or there is something easier?

Can I somehow make a composite shape (region), consisted of
two shapes, like first to define the RoundRect and that to add the
Triangle at the appropriate side?

What do you suggest?




Best regards,
Vladimir Stefanovic 
Technical Details
Message-ID: <4201f8d1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f2d6803ccc163de2,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: About Polygon Region forms
Date: Thu, 3 Feb 2005 11:11:36 +0100
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 82.117.212.65
Message-ID: <4201f8d1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107425489 82.117.212.65 (3 Feb 2005 02:11:29 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail