Article View: borland.public.cppbuilder.nativeapi
Article #4365Re: Using the systray in services
From: Mark Jacobs
Date: Wed, 22 Feb 2006 14:49
Date: Wed, 22 Feb 2006 14:49
16 lines
1760 bytes
1760 bytes
"Bogdan" <boprea@xnet.ro> wrote in message news:43f70392@newsgroups.borland.com... > How can I process systray messages in a windows service?I need to display > an icon in the systray when the service is running, and remove it when it's > stopped, but the systray requires a handle to window where to send messages > when the icon is clicked or needs to be redrawn, and a service doesn't have > one. Services are not meant to have any UI whatsoever. Some command line switches, perhaps, but, as Remy quite rightly put it, you need a non-service bit to run in the GUI to catch messages in the GUI's message queue. Using Vladimir's post, you can forward the relevant ones onto your service somehow. -- Mark Jacobs DK Computing http://www.dkcomputing.co.uk
Technical Details
Message-ID:
<43fc79a6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<43f70392@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ee340e11c1cfabb3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mark Jacobs" <http://www.jacobsm.com/mjmsg?Borland%20Newsgroup> Newsgroups: borland.public.cppbuilder.nativeapi References: <43f70392@newsgroups.borland.com> Subject: Re: Using the systray in services Date: Wed, 22 Feb 2006 14:49:05 -0000 Lines: 18 Organization: DK Computing X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 81.144.157.8 Message-ID: <43fc79a6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1140619686 81.144.157.8 (22 Feb 2006 06:48:06 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail