| 2161 | } |
| 2162 | |
| 2163 | VOID MinimizeWndToTray ( HWND hWnd ) |
| 2164 | { |
| 2165 | if ( GetDoAnimateMinimize() ) { |
| 2166 | RECT rcFrom, rcTo; |
| 2167 | // Get the rect of the window. It is safe to use the rect of the whole |
| 2168 | // window - DrawAnimatedRects will only draw the caption |
| 2169 | GetWindowRect ( hWnd, &rcFrom ); |
| 2170 | GetTrayWndRect ( &rcTo ); |
| 2171 | // Get the system to draw our animation for us |
| 2172 | DrawAnimatedRects ( hWnd, IDANI_CAPTION, &rcFrom, &rcTo ); |
| 2173 | } |
| 2174 | // Add the tray icon. If we add it before the call to DrawAnimatedRects, |
| 2175 | // the taskbar gets erased, but doesn't get redrawn until DAR finishes. |
| 2176 | // This looks untidy, so call the functions in this order |
| 2177 | // Hide the window |
| 2178 | ShowWindow ( hWnd, SW_HIDE ); |
| 2179 | } |
| 2180 | |
| 2181 | VOID RestoreWndFromTray ( HWND hWnd ) |
| 2182 | { |
no test coverage detected