bacMenu::~bacMenu()
{
// Remove the tray icon
- SendTrayMsg(NIM_DELETE, 0);
+ DelTrayIcon();
// Destroy the loaded menu
if (m_hmenu != NULL)
void
bacMenu::UpdateTrayIcon(int bacstat)
{
- (void *)bac_status(NULL, 0);
+ (void)bac_status(NULL, 0);
SendTrayMsg(NIM_MODIFY, bacstat);
}
// Every five seconds, a timer message causes the icon to update
case WM_TIMER:
- // *** HACK for running servicified
if (bacService::RunningAsService()) {
// Attempt to add the icon if it's not already there
_this->AddTrayIcon();
}
case WM_CLOSE:
+ if (bacService::RunningAsService()) {
+ _this->DelTrayIcon();
+ }
terminate_filed(0);
break;