模拟qq窗口抖动效果

Posted zeqi1991

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了模拟qq窗口抖动效果相关的知识,希望对你有一定的参考价值。

	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);
	

以上是关于模拟qq窗口抖动效果的主要内容,如果未能解决你的问题,请参考以下文章

模拟QQ窗口抖动效果(通过MoveWindow和Sleep进行模拟)

移动端fixed的元素抖动的问题

C语言实现聊天工具钟的抖动窗口功能,代码很简单,思路也很简单

layer实现窗口抖动效果

WPF window 子窗口反馈效果(抖动/阴影渐变)

文本窗口抖动和位移效果