Shell_NotifyIcon在任务栏添加一个图标

Shell_NotifyIcon在任务栏添加一个图标

memset(&ntfData,0,sizeof(ntfData));
 ntfData.cbSize = sizeof(NOTIFYICONDATA);
 ntfData.hWnd = this->GetSafeHwnd();
 if(m_hCurrentIcon)
  ntfData.hIcon = m_hCurrentIcon;
 ntfData.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
 ntfData.uID = IDR_MAINFRAME;
 memcpy(ntfData.szTip, m_strTipNormal, sizeof(ntfData.szTip)-1);
 ntfData.uCallbackMessage = WM_COMMANDNOTIFY;
 Shell_NotifyIcon(NIM_ADD, &ntfData);

你可能感兴趣的:(Shell_NotifyIcon在任务栏添加一个图标)