Article View: borland.public.cppbuilder.nativeapi
Article #9850Re: Add shadow to a form
From: Mario Sernicola
Date: Fri, 11 Jun 2004 11:38
Date: Fri, 11 Jun 2004 11:38
55 lines
2508 bytes
2508 bytes
Nothing to do!
The first time I've launched my exe, the shadow appears, after I've executed
SystemParametersInfo(0x1025, FALSE, NULL, 0);
and the shadow doesn't appear anymore
Now I'm trying this code, according to your previous message:
bool shadow = false //global variable
//--------------------------------------------------------------------------
-
void __fastcall TForm1::CreateParams(TCreateParams &Params)
{
const CS_DROPSHADOW = 0x00020000;
TForm::CreateParams(Params);
if (shadow)
Params.WindowClass.style |= CS_DROPSHADOW;
else
Params.WindowClass.style &= ~CS_DROPSHADOW;
SystemParametersInfo(0x1025, TRUE, NULL, 0);
}
//--------------------------------------------------------------------------
-
void __fastcall TForm1::Button8Click(TObject *Sender)
{
shadow=true;
RecreateWnd();
}
//--------------------------------------------------------------------------
-
void __fastcall TForm1::Button7Click(TObject *Sender)
{
shadow=false;
RecreateWnd();
}
//--------------------------------------------------------------------------
-
But it seems not working. Where have I wrong?
There's a way to not use RecreateWnd function?
My really scope is to obtain a shadow like Photoshop splash screen, that
shadow is bigger and better than the shadow I can obtain with previous code
.
Thanks
Mario Sernicola
Technical Details
Message-ID:
<40c999be$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.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-mailReferences:
<40c6e830@newsgroups.borland.com> <40c84615$1@newsgroups.borland.com> <40c88f63$1@newsgroups.borland.com> <40c8a7f1$1@newsgroups.borland.com> <40c8ba1d@newsgroups.borland.com> <40c8c7e5$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,700c24ec51a7d447 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 References: <40c6e830@newsgroups.borland.com> <40c84615$1@newsgroups.borland.com> <40c88f63$1@newsgroups.borland.com> <40c8a7f1$1@newsgroups.borland.com> <40c8ba1d@newsgroups.borland.com> <40c8c7e5$2@newsgroups.borland.com> Subject: Re: Add shadow to a form Date: Fri, 11 Jun 2004 13:38:45 +0200 Lines: 57 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.138.186 Message-ID: <40c999be$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1086953918 80.181.138.186 (11 Jun 2004 04:38:38 -0700) Path: arc1-ca.pugleaf.net!g2news1.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