[SHELL32] SHChangeNotify: Add drive, remove drive (#6782)

Implementing missing features...
JIRA issue: CORE-13950
- Add WM_DEVICECHANGE message handler in the shell window to detect
  DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE.
- Use GetLogicalDrives function to detect drives.
- Use SHChangeNotify to send SHCNE_DRIVEADD and
  SHCNE_DRIVEREMOVED notifications.
- Modify CDefView::OnChangeNotify.
This commit is contained in:
Katayama Hirofumi MZ
2024-04-23 08:28:38 +09:00
committed by GitHub
parent a8ece7e81a
commit 1dc8d80ca1
2 changed files with 36 additions and 1 deletions

View File

@@ -2287,6 +2287,7 @@ LRESULT CDefView::OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &
{
case SHCNE_MKDIR:
case SHCNE_CREATE:
case SHCNE_DRIVEADD:
if (bParent0)
{
if (LV_FindItemByPidl(ILFindLastID(Pidls[0])) == -1)
@@ -2297,6 +2298,7 @@ LRESULT CDefView::OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &
break;
case SHCNE_RMDIR:
case SHCNE_DELETE:
case SHCNE_DRIVEREMOVED:
if (bParent0)
LV_DeleteItem(ILFindLastID(Pidls[0]));
break;