Article View: borland.public.cppbuilder.nativeapi
Article #5462Re: Icon Tray Popup Menu Bug
From: JD
Date: Thu, 18 Aug 2005 01:08
Date: Thu, 18 Aug 2005 01:08
30 lines
2181 bytes
2181 bytes
Colin B Maharaj <noreply@myhost.com> wrote:
>
> [...] but now in BCB6 it has no effect.
Your message map looks correct so I have to assume that you've
made an error elsewhere. You didn't show the definition for
WM_TRAYNOTIFY or that you had properly assign it to the
uCallbackMessage member of the NOTIFYICONDATA struct.
Another possible reason that it's not working for you would
be if you incorrectly assigned the hWnd member of the
NOTIFYICONDATA struct.
I would suggest that you use (for free) a class that I wrote
because it handles other issues that I'm sure you've over
looked. For example, a number of things can cause the
underlying window of your form to be recreated and if that
happens, your icon will become non-responsive because the hWnd
member of the NOTIFYICONDATA struct will no longer be valid.
Another issue is when the system recreates the taskbar. If you
don't handle that correctly, your icon will disappear all
together.
Even if you don't use it, you could still see how it handles
things:
http://groups.google.com/group/borland.public.cppbuilder.vcl.components.using/msg/57af11b9a35689b0?hl=en&
~ JD
Technical Details
Message-ID:
<4303dfa9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!border1.nntp.ams.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<430306ea$1@newsgroups.borland.com> <43037e37$1@newsgroups.borland.com> <4303ccb7@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9fcf3cd5c7af18de X-Google-Attributes: gid10cc67,public 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: Icon Tray Popup Menu Bug Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 205.188.116.198 X-Forwarded-For: 172.156.67.133 References: <430306ea$1@newsgroups.borland.com> <43037e37$1@newsgroups.borland.com> <4303ccb7@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <4303dfa9$1@newsgroups.borland.com> Date: 17 Aug 2005 18:08:57 -0700 X-Trace: newsgroups.borland.com 1124327337 207.105.83.66 (17 Aug 2005 18:08:57 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!border1.nntp.ams.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail