首页 > 代码库 > 模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)
模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)
[cpp] view plain copy
- 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进行模拟)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。