https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d29fba7f7aca41091fb61…
commit d29fba7f7aca41091fb61f21afbb529c8406bcbd
Author: 赫杨 <1160386205(a)qq.com>
AuthorDate: Mon Aug 3 21:54:01 2020 +0800
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Sep 6 17:10:16 2020 +0200
[RAPPS] fix the bug that Toolbar is not working
---
base/applications/rapps/appview.cpp | 64 +++++++++++++++++++++----------------
1 file changed, 37 insertions(+), 27 deletions(-)
diff --git a/base/applications/rapps/appview.cpp b/base/applications/rapps/appview.cpp
index 77da1851a38..dff7c0eca85 100644
--- a/base/applications/rapps/appview.cpp
+++ b/base/applications/rapps/appview.cpp
@@ -1784,6 +1784,7 @@ VOID CApplicationView::OnCommand(WPARAM wParam, LPARAM lParam)
break;
}
+ return;
}
else if ((HWND)lParam == m_ComboBox->GetWindow())
{
@@ -1801,42 +1802,51 @@ VOID CApplicationView::OnCommand(WPARAM wParam, LPARAM lParam)
}
break;
}
+
+ return;
+ }
+ else if ((HWND)lParam == m_Toolbar->GetWindow())
+ {
+ // the message is sent from Toolbar. fall down to continue process
+ }
+ else
+ {
+ return;
}
}
- else
- {
- WORD wCommand = LOWORD(wParam);
- switch (wCommand)
- {
- case ID_INSTALL:
- m_MainWindow->InstallApplication((CAvailableApplicationInfo
*)GetFocusedItemData());
- break;
+ // the LOWORD of wParam contains a Menu or Control ID
+ WORD wCommand = LOWORD(wParam);
- case ID_TOOLBAR_INSTALL:
- m_MainWindow->SendMessageW(WM_COMMAND, ID_INSTALL, 0);
- break;
+ switch (wCommand)
+ {
+ case ID_INSTALL:
+ m_MainWindow->InstallApplication((CAvailableApplicationInfo
*)GetFocusedItemData());
+ break;
- case ID_UNINSTALL:
- m_MainWindow->SendMessageW(WM_COMMAND, ID_UNINSTALL, 0);
- break;
+ case ID_TOOLBAR_INSTALL:
+ m_MainWindow->SendMessageW(WM_COMMAND, ID_INSTALL, 0);
+ break;
- case ID_MODIFY:
- m_MainWindow->SendMessageW(WM_COMMAND, ID_MODIFY, 0);
- break;
+ case ID_UNINSTALL:
+ m_MainWindow->SendMessageW(WM_COMMAND, ID_UNINSTALL, 0);
+ break;
- case ID_REGREMOVE:
- m_MainWindow->SendMessageW(WM_COMMAND, ID_REGREMOVE, 0);
- break;
+ case ID_MODIFY:
+ m_MainWindow->SendMessageW(WM_COMMAND, ID_MODIFY, 0);
+ break;
- case ID_REFRESH:
- m_MainWindow->SendMessageW(WM_COMMAND, ID_REFRESH, 0);
- break;
+ case ID_REGREMOVE:
+ m_MainWindow->SendMessageW(WM_COMMAND, ID_REGREMOVE, 0);
+ break;
- case ID_RESETDB:
- m_MainWindow->SendMessageW(WM_COMMAND, ID_RESETDB, 0);
- break;
- }
+ case ID_REFRESH:
+ m_MainWindow->SendMessageW(WM_COMMAND, ID_REFRESH, 0);
+ break;
+
+ case ID_RESETDB:
+ m_MainWindow->SendMessageW(WM_COMMAND, ID_RESETDB, 0);
+ break;
}
}