🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Vista & DrawAnimatedRects

#1479
From: Kris
Date: Sat, 11 Aug 2007 18:10
40 lines
2466 bytes
JD wrote:
> That code looks familure <g>
It should :-) Up until now I was using your AnimatedTrayIcon class which 
has been very helpful. But when I migrated my project to C++ Builder 
2007 I was encountering all sorts of problems (no balloons, strange 
minimize to tray behaviour). Rather than trying to fix your code I 
decided to write my own system tray code while occasionally having a 
look at your source <g>

I don't know if you're interested. But one of the things I encountered 
was that, when compiling with Builder 2007, XP didn't display a balloon 
anymore while Vista still worked just fine. I managed to track it down 
to this part of the code:

NOTIFYICONDATA IconData = { 0 };
IconData.cbSize = sizeof( NOTIFYICONDATA );

When I changed this into the following code the XP balloons appeared again:

NOTIFYICONDATA IconData = { 0 };
IconData.cbSize = NOTIFYICONDATA_V2_SIZE;

My best guess is that C++ Builder 2007 is probably using a 
NOTIFYICONDATA which size matches NOTIFYICONDATA_V3_SIZE and therefore 
causes some problems on XP.

> 
>> Depending on the animation I need I use:
>> DrawAnimatedRects(Handle,IDANI_CAPTION, &BoundsRect, &TrayRect );
>> or
>> DrawAnimatedRects(Handle,IDANI_CAPTION, &TrayRect, &BoundsRect);
> 
> I was able to reproduce the problem on XP by changing the HWND
> parameter but like Bob, don't have Vista either. The docs say
> that the HWND is used for clipping so my best guess is Vista
> just doesn't like your 'Handle' parameter.

Thanks. I'll have a closer look at the handle.

Kris
Technical Details
Message-ID: <46bdfba4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46bc4487$1@newsgroups.borland.com> <46bcee7b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fb86ab6d2f5d603a
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 11 Aug 2007 20:10:57 +0200
From: Kris <ks@ks.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Vista & DrawAnimatedRects
References: <46bc4487$1@newsgroups.borland.com> <46bcee7b$1@newsgroups.borland.com>
In-Reply-To: <46bcee7b$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 83.134.82.181
Message-ID: <46bdfba4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1186855844 83.134.82.181 (11 Aug 2007 11:10:44 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail