🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#141
From: Ian Michael Ash
Date: Fri, 17 Nov 2000 00:00
31 lines
2131 bytes
I've seen the same thing with my applications, though in my case I don't
care much about it.

One thing you could try is kill the application in question. Then add an
arbitrary icon to the tray bar and remove it. This should cause Windows to
completely redraw the tray bar and remove any unused icons.

Just an idea off the top of my head.
Ian


CG wrote in message ...
>In my program, I make a system kill of an application that have an icon
tray
>in the traybar...
>But the problem is that the icon isn't kill properly by the killed
>application to the task icon remains here.
>The only way to delete the tray icon is to move the mouse over the tray
>icon, but I'd like to di it in my programm after I kill the application.
>I try something like that :
>
>hwndTaskBar  = FindWindowEx (NULL, NULL, "Shell_TrayWnd", NULL);
>hwndTrayWnd = FindWindowEx (hwndTaskBar , NULL, "TrayNotifyWnd", NULL);
>
>and then SendMEssage (hwndTrayWnd , WM_PAINT, 0, 0);
>
>but it doesn't work.
>Any idea ???
>Chris.
>
>
Technical Details
Message-ID: <8v38h0$2bgf$1@nnrp01.ops.uunet.co.za>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <FU8R5.763$%o6.2878648@nnrp3.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: 1053e6,d00bad325b1977a5
X-Google-Attributes: gid1053e6,public
X-Google-Thread: 104d65,d00bad325b1977a5
X-Google-Attributes: gid104d65,public
X-Google-Thread: 113dfb,d00bad325b1977a5
X-Google-Attributes: gid113dfb,public
X-Google-Thread: f5082,d00bad325b1977a5
X-Google-Attributes: gidf5082,public
From: "Ian Michael Ash" <ian@dchip.com>
Subject: Re: How to Kill a Tray icon from an another application  ?
Date: 2000/11/17
Message-ID: <8v38h0$2bgf$1@nnrp01.ops.uunet.co.za>
X-Deja-AN: 694713824
References: <FU8R5.763$%o6.2878648@nnrp3.proxad.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
X-Complaints-To: abuse@mweb.co.za
X-Trace: nnrp01.ops.uunet.co.za 974464352 77327 196.31.27.194 (17 Nov 2000 12:32:32 GMT)
Organization: UUNET(SA) News Reading Server
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