Article View: borland.public.cppbuilder.nativeapi
Article #9842Re: Add shadow to a form
From: Remy Lebeau (TeamB)
Date: Thu, 10 Jun 2004 20:38
Date: Thu, 10 Jun 2004 20:38
26 lines
1934 bytes
1934 bytes
"Mario Sernicola" <mariosernicola@nospam.libero.it> wrote in message
news:40c8ba1d@newsgroups.borland.com...
> Params.Style = Params.Style | CS_DROPSHADOW; //<---- is it right???
That is not correct. You should be adding the style to the WindowClass
member instead, ie:
Params.WindowClass.style |= CS_DROPSHADOW;
> How can restore in my WinXp system, form shadows?
You already know the answer to that - call SystemParametersInfo() with the
uiAction set to SPI_SETDROPSHADOW and the pvParam set to TRUE.
> How can I toggle shadows in my forms by code?
Simple store a flag somewhere that indicates whether the shadow should be
applied or not, and then have CreateParams() access that flag when deciding
whether to apply or remove the CS_DROPSHADOW style. Then just call the
form's RecreateWnd() method whenever you change the value of the flag after
it has been set the first time.
Gambit
Technical Details
Message-ID:
<40c8c7e5$2@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>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,700c24ec51a7d447 X-Google-Attributes: gid10cc67,public From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> 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> Subject: Re: Add shadow to a form Date: Thu, 10 Jun 2004 13:38:44 -0700 Lines: 28 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: 68.169.168.124 Message-ID: <40c8c7e5$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1086900197 68.169.168.124 (10 Jun 2004 13:43:17 -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