🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

SetWindowRgn function and come back

#10023
From: Mario Sernicola
Date: Mon, 31 May 2004 08:09
29 lines
1649 bytes
Hi,

I would like to create irregular Form, so I use SetWindowRgn function:

//--------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
  TPoint points[4];
  points[0] = Point(0,0);
  points[1] = Point(100,100);
  points[2] = Point(200,200);
  points[3] = Point(300,300);

    HRGN RegionA1 = CreatePolygonRgn(points, 4, WINDING);

     SetWindowRgn(this->Handle,RegionA1, true);
}
//-------------------------------------------------------------------------

When I push Button2, the parent Form of Button2 change is aspect and all is
ok.

The Question is:
How can I come back to original rectangular form, by code, without restart
my program?

Thanks

Mario Sernicola
Technical Details
Message-ID: <40bae82f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a79b3d53b0dd1803,start
X-Google-Attributes: gid10cc67,public
Reply-To: "Mario Sernicola" <mariosernicola@nospam.libero.it>
From: "Mario Sernicola" <mariosernicola@nospam.libero.it>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: SetWindowRgn function and come back
Date: Mon, 31 May 2004 10:09:28 +0200
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 80.181.137.195
Message-ID: <40bae82f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1085990959 80.181.137.195 (31 May 2004 01:09:19 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail