zoukankan      html  css  js  c++  java
  • 模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)

    [cpp] view plain copy
     
    1. RECT rtWindow;  
    2.     GetWindowRect(&rtWindow);  
    3.     //long x = 400;  
    4.     //long y = 200;  
    5.     long x = rtWindow.left;  
    6.     long y = rtWindow.top;  
    7.     long cxWidth = rtWindow.right-rtWindow.left;  
    8.     long cyHeight = rtWindow.bottom-rtWindow.top;  
    9.     const long nOffset  = 9;  
    10.     const long SLEEP_INTERAL = 60;  
    11.       
    12.     for(long i=0; i<=2; ++i)  
    13.     {  
    14.         ::MoveWindow(m_hWnd, x+nOffset, y-nOffset, cxWidth, cyHeight, TRUE);  
    15.         ::Sleep(SLEEP_INTERAL);  
    16.         ::MoveWindow(m_hWnd, x-nOffset, y-nOffset, cxWidth, cyHeight, TRUE);  
    17.         ::Sleep(SLEEP_INTERAL);  
    18.         ::MoveWindow(m_hWnd, x-nOffset, y+nOffset, cxWidth, cyHeight, TRUE);  
    19.         ::Sleep(SLEEP_INTERAL);  
    20.         ::MoveWindow(m_hWnd, x+nOffset, y+nOffset ,cxWidth, cyHeight, TRUE);  
    21.         ::Sleep(SLEEP_INTERAL);  
    22.         ::MoveWindow(m_hWnd, x, y, cxWidth, cyHeight, TRUE);  
    23.         ::Sleep(SLEEP_INTERAL);  
    24.     }  

    参考:http://www.rupeng.com/forum/thread-6423-1-1.html

    http://blog.csdn.net/analogous_love/article/details/47979739

  • 相关阅读:
    ps:图层知识
    ps:选区的存储及载入
    ps:消除锯齿和羽化
    ps:不规则选区
    ps:建立规则选区
    python如何查看内存占用空间
    python-生成器
    python3-列表生成式
    python:迭代
    Photoshop画笔工具的使用
  • 原文地址:https://www.cnblogs.com/findumars/p/7128402.html
Copyright © 2011-2022 走看看