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