Article View: borland.public.cppbuilder.nativeapi
Article #689Re: Multiple Shell_NotifyIcon calls
From: Asger Joergensen
Date: Sat, 23 Feb 2008 16:32
Date: Sat, 23 Feb 2008 16:32
28 lines
2168 bytes
2168 bytes
Hi Kris Kris says: > Remy Lebeau (TeamB) wrote: > > Why are you creating the icon so early to begin with? > Well, I assumed that the best time to create the icon is when my > application starts. > > I suppose I could use a timer and wait until a few seconds after > initializing my app before actually creating the system tray icon. And > probably this will reduce, if not eliminate, my problem. Just a couple of ideas: Create Your icon in the application OnIdle event that way Your app will be fully created before You create Your Icon. OnIdle is called more then once so You need to set a flag when Your icon is created or if You dont use OnIdle for anything else You can set Application->OnIdle = 0; when You are done. or as You mention use a timer with intervall set to e.g. 100 then start it in WM_CREATE, it will not return until Your app is fully created, because it fires using a message which Your app will not process before it is free to do so. Kind regards Asger
Technical Details
Message-ID:
<MPG.222a69221f6aefd5989a7d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!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> <47bc8d05@newsgroups.borland.com> <47bf5bd8$1@newsgroups.borland.com> <47bf6cce$1@newsgroups.borland.com> <47c02cfe$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: Asger Joergensen <junk@Asger-P.dk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Multiple Shell_NotifyIcon calls Date: Sat, 23 Feb 2008 17:32:57 +0100 Message-ID: <MPG.222a69221f6aefd5989a7d@newsgroups.borland.com> References: <47B85E8F.6040508@ks.com> <47bb1415$1@newsgroups.borland.com> <47bc8219$1@newsgroups.borland.com> <47bc8d05@newsgroups.borland.com> <47bf5bd8$1@newsgroups.borland.com> <47bf6cce$1@newsgroups.borland.com> <47c02cfe$1@newsgroups.borland.com> Organization: Asger-P MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/2.70.2067 NNTP-Posting-Host: 83.73.220.89 X-Trace: newsgroups.borland.com 1203784374 83.73.220.89 (23 Feb 2008 08:32:54 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail