| 174 | } |
| 175 | |
| 176 | void TrayIcon::SendNotification(uint16_t textResource, UINT flags, DWORD infoFlags) |
| 177 | { |
| 178 | if (m_CurrentlyShowing) |
| 179 | { |
| 180 | // copy the data because if explorer restarts or the theme/settings change we don't want to re-send the notification |
| 181 | auto data = m_IconData; |
| 182 | data.uFlags |= NIF_INFO | flags; |
| 183 | data.dwInfoFlags = infoFlags; |
| 184 | // don't set szInfoTitle, the OS will show the app name already. |
| 185 | |
| 186 | Localization::LoadLocalizedResourceString(textResource, hinstance()).copy(data.szInfo, std::size(data.szInfo)); |
| 187 | |
| 188 | Notify(NIM_MODIFY, &data); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | TrayIcon::~TrayIcon() noexcept(false) |
| 193 | { |