MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / MinimizeWndToTray

Function MinimizeWndToTray

src/Helpers.c:2163–2179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2161}
2162
2163VOID 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
2181VOID RestoreWndFromTray ( HWND hWnd )
2182{

Callers 1

MainWndProcFunction · 0.85

Calls 2

GetDoAnimateMinimizeFunction · 0.85
GetTrayWndRectFunction · 0.85

Tested by

no test coverage detected