void startAlert(HWND hwnd, int durationMs, int timeoutMs)
{
FLASHWINFO info;
info.cbSize = sizeof(info);
info.hwnd = hwnd;
info.dwFlags = FLASHW_TRAY;
info.dwTimeout = timeoutMs;
info.uCount = durationMs == 0 ? 10 : durationMs / timeoutMs;
FlashWindowEx(&info);
}
void stopAlert(HWND hwnd)
{
FLASHWINFO info;
info.cbSize = sizeof(info);
info.hwnd = hwnd;
info.dwFlags = FLASHW_STOP;
info.dwTimeout = 0;
info.uCount = 0;
FlashWindowEx(&info);
}
windows任务栏高亮
Published: at 11:35 AM | 1 min read