模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)
Posted 朝闻道
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)相关的知识,希望对你有一定的参考价值。
- RECT rtWindow;
- GetWindowRect(&rtWindow);
- //long x = 400;
- //long y = 200;
- long x = rtWindow.left;
- long y = rtWindow.top;
- long cxWidth = rtWindow.right-rtWindow.left;
- long cyHeight = rtWindow.bottom-rtWindow.top;
- const long nOffset = 9;
- const long SLEEP_INTERAL = 60;
- for(long i=0; i<=2; ++i)
- {
- ::MoveWindow(m_hWnd, x+nOffset, y-nOffset, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x-nOffset, y-nOffset, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x-nOffset, y+nOffset, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x+nOffset, y+nOffset ,cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- ::MoveWindow(m_hWnd, x, y, cxWidth, cyHeight, TRUE);
- ::Sleep(SLEEP_INTERAL);
- }
参考:http://www.rupeng.com/forum/thread-6423-1-1.html
http://blog.csdn.net/analogous_love/article/details/47979739
以上是关于模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)的主要内容,如果未能解决你的问题,请参考以下文章