@@ -551,6 +551,8 @@ CreateDirWindow(
551551 return hwndT ;
552552 }
553553
554+ BOOLEAN bDriveChanged = FALSE;
555+
554556 //
555557 // Are we replacing the contents of the currently active child?
556558 //
@@ -561,6 +563,7 @@ CreateDirWindow(
561563 // if not already selected, do so now
562564 if (i != SendMessage (hwndDriveList , CB_GETCURSEL , i , 0L )) {
563565 SelectToolbarDrive (i );
566+ bDriveChanged = TRUE;
564567 }
565568 break ;
566569 }
@@ -579,7 +582,7 @@ CreateDirWindow(
579582 //
580583 // update the tree if necessary
581584 //
582- ;
585+
583586 if (hwndT = HasTreeWindow (hwndActive )) {
584587 SendMessage (hwndT , TC_SETDRIVE , 0 , (LPARAM )(szPath ));
585588 }
@@ -588,6 +591,10 @@ CreateDirWindow(
588591 // Update the status in case we are "reading"
589592 //
590593 UpdateStatus (hwndActive );
594+ if (bDriveChanged ) {
595+ InvalidateRect (hwndDriveBar , NULL , TRUE);
596+ UpdateWindow (hwndDriveBar );
597+ }
591598
592599 return hwndActive ;
593600 }
@@ -1163,10 +1170,10 @@ AppCommandProc(DWORD id)
11631170 break ;
11641171
11651172 case IDM_CLOSEWINDOW :
1166- {
1167- HWND hwndActive ;
1173+ {
1174+ HWND hwndActive ;
11681175
1169- hwndActive = (HWND )SendMessage (hwndMDIClient , WM_MDIGETACTIVE , 0 , 0L );
1176+ hwndActive = (HWND )SendMessage (hwndMDIClient , WM_MDIGETACTIVE , 0 , 0L );
11701177
11711178 SendMessage (hwndActive , FS_GETDIRECTORY , COUNTOF (szPath ), (LPARAM )szPath );
11721179 if (ISUNCPATH (szPath ))
@@ -1176,9 +1183,9 @@ AppCommandProc(DWORD id)
11761183
11771184 }
11781185 else
1179- PostMessage (hwndActive , WM_CLOSE , 0 , 0L );
1180- }
1181- break ;
1186+ PostMessage (hwndActive , WM_CLOSE , 0 , 0L );
1187+ }
1188+ break ;
11821189
11831190 case IDM_SELECT :
11841191
0 commit comments