windows任务栏高亮

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任务栏高亮)