Ramu Pulipati wrote: If you are using MFC, make sure you are not dealing with taskbar icon in CMyDocument::OnNewDocument() or CMyDocument::OnCloseDocument() or CMyDocument::DeleteConetents(). Its better to handle taskbar add/remove operations in CWinApp derived class. I do not actually handle any of taskbar events explicitly, nor I use tray icons. This is just regular taskbar button that does not work... Thanks, Yuri