Article View: comp.os.ms-windows.programmer.tools.mfc
Article #142Re: How to Kill a Tray icon from an another application ?
From: SNOW CRASH
Date: Fri, 17 Nov 2000 00:00
Date: Fri, 17 Nov 2000 00:00
41 lines
2285 bytes
2285 bytes
On Fri, 17 Nov 2000 14:35:48 +0200, "Ian Michael Ash" <ian@dchip.com> wrote: >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. >> >> > > Just a guess, but try and (instead) do an InvalidateRect(hwndTrayWnd, NULL); // CHRIS
Technical Details
Message-ID:
<3a154d9c.1290767305@news.dsl.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<FU8R5.763$%o6.2878648@nnrp3.proxad.net> <8v38h0$2bgf$1@nnrp01.ops.uunet.co.za>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: f5082,d00bad325b1977a5 X-Google-Attributes: gidf5082,public X-Google-Thread: 104d65,d00bad325b1977a5 X-Google-Attributes: gid104d65,public X-Google-Thread: 1053e6,d00bad325b1977a5 X-Google-Attributes: gid1053e6,public From: win32mfc@yahoo.com (SNOW CRASH) Subject: Re: How to Kill a Tray icon from an another application ? Date: 2000/11/17 Message-ID: <3a154d9c.1290767305@news.dsl.net> X-Deja-AN: 694768430 References: <FU8R5.763$%o6.2878648@nnrp3.proxad.net> <8v38h0$2bgf$1@nnrp01.ops.uunet.co.za> Organization: Posted via Supernews, http://www.supernews.com Reply-To: win32mfc@yahoo.com 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 X-Complaints-To: newsabuse@supernews.com