Shell_NotifyIcon如何强制显示tip

 例如在程序退出是,systrayicon强制显示一个提示,等待若干秒退出

LRESULT CMainFrame::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
  NOTIFYICONDATA nd;
 nd.cbSize = sizeof (NOTIFYICONDATA);
 nd.hWnd = m_hWnd;
 nd.uID  = IDR_MAINFRAME; 
 nd.uFlags = NIF_INFO;
 nd.dwInfoFlags = NIIF_INFO;
 nd.uTimeout =  1000;
 wcscpy(nd.szInfoTitle, L"Tip");
 wcscpy(nd.szInfo, L"Exits Now");
 Shell_NotifyIcon(NIM_MODIFY, &nd);
 
 Sleep(1000);
 Shell_NotifyIcon(NIM_DELETE, &nd);

 PostQuitMessage(0);
 bHandled = FALSE;
 return 0;
}

你可能感兴趣的:(shell,delete)