- RECT rtWindow;  
-     GetWindowRect(&rtWindow);  
-     
-     
-     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进行模拟)
原文:http://www.cnblogs.com/findumars/p/7128402.html