Article View: borland.public.cppbuilder.nativeapi
Article #671Re: Multiple Shell_NotifyIcon calls
From: Remy Lebeau (TeamB)
Date: Wed, 20 Feb 2008 20:27
Date: Wed, 20 Feb 2008 20:27
23 lines
2040 bytes
2040 bytes
"Kris" <ks@ks.com> wrote in message
news:47bc8219$1@newsgroups.borland.com...
> I do have another question though. My app is loaded during windows startup
> in the system tray (and does not show its main window). Most
> of the time this works just fine, but occasionally the app gets loaded
> but no system tray icon is created. It's hard to reproduce, but it does
> happen from time to time.
It could be that you are simply trying to add the icon before the taskbar
itself has actualy been created yet. To handle that (and to handle when the
Shell crashes and has to recreate the taskbar), you need to intercept the
"TaskbarCreated" broadcast message. Refer to the following article for more
details:
The Taskbar
http://msdn2.microsoft.com/en-us/library/bb776822.aspx
In particular, look at the "Taskbar Creation Notification" section.
Gambit
Technical Details
Message-ID:
<47bc8d05@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!aotearoa.belnet.be!news.belnet.be!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47B85E8F.6040508@ks.com> <47bb1415$1@newsgroups.borland.com> <47bc8219$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fd4854ec85a82474 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <47B85E8F.6040508@ks.com> <47bb1415$1@newsgroups.borland.com> <47bc8219$1@newsgroups.borland.com> Subject: Re: Multiple Shell_NotifyIcon calls Date: Wed, 20 Feb 2008 12:27:10 -0800 Lines: 25 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 207.178.157.90 Message-ID: <47bc8d05@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1203539205 207.178.157.90 (20 Feb 2008 12:26:45 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!aotearoa.belnet.be!news.belnet.be!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail