mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[BROWSEUI] Support mouse back and forward buttons (#5623)
Add WM_APPCOMMAND handling to the shell browser. CORE-16776
This commit is contained in:
parent
d8a4eb3cc9
commit
ff63d06406
1 changed files with 23 additions and 0 deletions
|
@ -626,6 +626,7 @@ public:
|
|||
LRESULT RelayCommands(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
LRESULT OnSettingsChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnGetSettingsPtr(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnAppCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
HRESULT OnSearch();
|
||||
|
||||
static ATL::CWndClassInfo& GetWndClassInfo()
|
||||
|
@ -678,6 +679,7 @@ public:
|
|||
MESSAGE_HANDLER(WM_COMMAND, RelayCommands)
|
||||
MESSAGE_HANDLER(BWM_SETTINGCHANGE, OnSettingsChange)
|
||||
MESSAGE_HANDLER(BWM_GETSETTINGSPTR, OnGetSettingsPtr)
|
||||
MESSAGE_HANDLER(WM_APPCOMMAND, OnAppCommand)
|
||||
END_MSG_MAP()
|
||||
|
||||
BEGIN_CONNECTION_POINT_MAP(CShellBrowser)
|
||||
|
@ -3812,6 +3814,27 @@ LRESULT CShellBrowser::OnGetSettingsPtr(UINT uMsg, WPARAM wParam, LPARAM lParam,
|
|||
return NO_ERROR;
|
||||
}
|
||||
|
||||
// WM_APPCOMMAND
|
||||
LRESULT CShellBrowser::OnAppCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
UINT uCmd = GET_APPCOMMAND_LPARAM(lParam);
|
||||
switch (uCmd)
|
||||
{
|
||||
case APPCOMMAND_BROWSER_BACKWARD:
|
||||
GoBack();
|
||||
break;
|
||||
|
||||
case APPCOMMAND_BROWSER_FORWARD:
|
||||
GoForward();
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME("uCmd: %u\n", uCmd);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT CShellBrowser_CreateInstance(REFIID riid, void **ppv)
|
||||
{
|
||||
return ShellObjectCreatorInit<CShellBrowser>(riid, ppv);
|
||||
|
|
Loading…
Reference in a new issue