[spambayes-dev] RE: [Spambayes] Outlook Envelope Tray Icon
kennypitt at hotmail.com
Fri Nov 7 13:13:34 EST 2003
Bob Chojnacki wrote:
> I really like SpamBayes and the Outlook plugin. It is working much
> better than other spam filters, considering I get 85-95% spam. I am
> currently using version 008.1. I read your FAQ about the problems
> with making the Outlook envelope tray icon go away. (I am also not
> sure if this is the right email address to send this comment, so
> please bear with me if it isn't.)
> Is the following link helpful? (Keep in mind that I am not a Windows
Thanks for the link. I created the following code to implement this in
the Outlook plugin and attached it to a menu item for testing. It was,
in fact, successful in removing the new mail envelope from the taskbar.
Now, the *really* tricky part is figuring out when to remove the icon.
def _removeIconCallback(hwnd, extra):
# Check for Outlook window class.
if win32gui.GetClassName(hwnd) == "rctrl_renwnd32":
# Got the correct class, but we need to make sure window title
# empty because there may be other top-level Outlook windows.
if win32gui.GetWindowText(hwnd) == "":
return not _killNewMailIcon(hwnd)
WUM_RESETNOTIFICATION = win32con.WM_USER + 7
nid = (hwnd, 0)
if not win32gui.Shell_NotifyIcon(win32gui.NIM_DELETE, nid):
win32gui.SendMessage(hwnd, WUM_RESETNOTIFICATION, 0, 0)
More information about the spambayes-dev