void ShakeWnd(HWND hWnd)
{
RECT rect;
GetWindowRect(hWnd,&rect);
for (int nItem = 0; nItem < 3; nItem++)
{
MoveWindow(hWnd,rect.left + 5, rect.top - 5, rect.right - rect.left, rect.bottom - rect.top,FALSE);
Sleep(30);
MoveWindow(hWnd, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, FALSE);
Sleep(30);
}
}
传入要抖动窗口HWND即可!