Article View: borland.public.cppbuilder.nativeapi
Article #1485Re: Vista & DrawAnimatedRects
From: JD
Date: Mon, 13 Aug 2007 17:31
Date: Mon, 13 Aug 2007 17:31
49 lines
2476 bytes
2476 bytes
Kris <ks@ks.com> wrote:
>
> [...] I don't know if you're interested.
I am.
> 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.
The cbSize member should be initialized depending on the
Shell32.dll version (which I did not know!) so I don't
think that it's a compiler issue. Besides, using V2_SIZE
reduces functionality so I don't think that that's right
even if it does work. For more, look here:
http://msdn2.microsoft.com/en-us/library/ms538121.aspx
>> I was able to reproduce the problem on XP [...]
>
> I'll have a closer look at the handle.
I see that I'm too late to tell you not to bother <g>.
The win32.hlp docs are completely buggered for DrawAnimatedRect.
Nothing is correct. MSN however is and the HWND *must* be (in
your case) the handle of the main form.
Without Vista, I'm of little help here. The best that I can do
is suggest that you test the tray icon component that comes
with the new compiler (it was completely rewritten for BDS).
If it works, look at the VCL source code.
~ JD
Technical Details
Message-ID:
<46c0958e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46bc4487$1@newsgroups.borland.com> <46bcee7b$1@newsgroups.borland.com> <46bdfba4$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 From: "JD" <nospam@nospam.com> Sender: "JD" <nospam@nospam.com> Reply-To: "JD" <nospam@nospam.com> Subject: Re: Vista & DrawAnimatedRects Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 64.12.116.144 X-Forwarded-For: 172.166.82.122 References: <46bc4487$1@newsgroups.borland.com> <46bcee7b$1@newsgroups.borland.com> <46bdfba4$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <46c0958e$1@newsgroups.borland.com> Date: 13 Aug 2007 10:31:58 -0700 X-Trace: newsgroups.borland.com 1187026318 207.105.83.66 (13 Aug 2007 10:31:58 -0700) Lines: 50 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail