zoukankan      html  css  js  c++  java
  • VC 任务栏图标闪烁

    像QQ来消息时的,图标闪烁效果

    将如下代码添加到Timer响应函数中

    else if (nIDEvent == 1)
        {// 任务栏图标闪烁
            if (this != GetForegroundWindow())
            {
            ////    this->ShowWindow(SW_RESTORE);
            ////    MoveWindow(&m_rect);
                HWND hCurwnd = NULL;
                hCurwnd = ::GetForegroundWindow();
                DWORD threadID = ::GetCurrentThreadId();
                DWORD threadprocessid = ::GetWindowThreadProcessId(hCurwnd, &threadID);
                ::AttachThreadInput(threadID, threadprocessid, TRUE);
                this->SetForegroundWindow();
                ::AttachThreadInput(threadID, threadprocessid, FALSE);
            }
        }

  • 相关阅读:
    RPC(简单实现)
    观察者模式
    自省(Introspector)
    Mybatis学习笔记
    Nginx
    AJAX跨域
    手写Tomcat
    监听器模式
    回调
    Temporal Segment Networks
  • 原文地址:https://www.cnblogs.com/nightnine/p/7503507.html
Copyright © 2011-2022 走看看