🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.mfc
Article #134

Re: How to Kill a Tray icon from an another application ?

#134
From: Jem Berkes
Date: Fri, 24 Nov 2000 00:00
19 lines
2345 bytes
> > How exactly are you retrieving ID_TrayIcon? According to MSDN,
> > NOTIFYICONDATA.uID is "Application-defined identifier of the taskbar
> > icon"
> Yes it is, but you can use Spy++ to retrieve it's value. With Spy++ Scan
> messages sent to the Window which has created TrayIcon ( "Title
> TrayIconWindow" in my sample application), then move your mouse on the
> TrayIcon for which you want to retrieve the ID, then you'will see in the
> scan Messages window of Spy++ a message like
> "WM_COMMAND wNotifyCode:0000 wID:130 hwndCtl:00000200"
> wID is the value of the TrayIcon (130 in my sample).

Chris,

Thanks... that's really neat! Once you have the icon ID is there any way
to "read" the icon? I mean get its HICON or something, for copying. I've
tried getting the Rect for TrayNotifyWnd and then scanning within there
using ChildWindowFromPointEx but the icons don't appear to be "child
windows" or anything. And I can't find any docs that explain how those
icons are stored. Any ideas?
Technical Details
Message-ID: <3A1E75F2.158324F9@pc9.CutThis.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <FU8R5.763$%o6.2878648@nnrp3.proxad.net> <enTSzhLUAHA.250@cppssbbsa02.microsoft.com> <8v6T5.648$NT.1224749@nnrp2.proxad.net> <3A1DDF20.D1731E47@pc9.CutThis.org> <dDrT5.1136$CG2.3521654@nnrp1.proxad.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1138df,d00bad325b1977a5
X-Google-Attributes: gid1138df,public
X-Google-Thread: 113dfb,d00bad325b1977a5
X-Google-Attributes: gid113dfb,public
X-Google-Thread: 1053e6,d00bad325b1977a5
X-Google-Attributes: gid1053e6,public
X-Google-Thread: f5082,d00bad325b1977a5
X-Google-Attributes: gidf5082,public
X-Google-Thread: 104d65,d00bad325b1977a5
X-Google-Attributes: gid104d65,public
From: Jem Berkes <jem@pc9.CutThis.org>
Subject: Re: How to Kill a Tray icon from an another application  ?
Date: 2000/11/24
Message-ID: <3A1E75F2.158324F9@pc9.CutThis.org>
X-Deja-AN: 697403384
Content-Transfer-Encoding: 7bit
References: <FU8R5.763$%o6.2878648@nnrp3.proxad.net> <enTSzhLUAHA.250@cppssbbsa02.microsoft.com> <8v6T5.648$NT.1224749@nnrp2.proxad.net> <3A1DDF20.D1731E47@pc9.CutThis.org> <dDrT5.1136$CG2.3521654@nnrp1.proxad.net>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: admin@mts.net
X-Trace: news1.mts.net 975074796 216.130.69.103 (Fri, 24 Nov 2000 08:06:36 CST)
Organization: PC9
MIME-Version: 1.0
NNTP-Posting-Date: Fri, 24 Nov 2000 08:06:36 CST
Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.programmer.win32,fr.comp.os.ms-windows.programmation,microsoft.public.fr.vc,microsoft.public.vc.mfc