mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 04:13:01 +00:00
[SHELL32][BROWSEUI] Make externally available FCIDM WM_COMMANDs work correctly (#8150)
This commit is contained in:
parent
02ad6b17ed
commit
38ad1ca394
7 changed files with 119 additions and 70 deletions
|
@ -33,6 +33,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(desktop);
|
|||
static const WCHAR szProgmanClassName[] = L"Progman";
|
||||
static const WCHAR szProgmanWindowName[] = L"Program Manager";
|
||||
|
||||
static BOOL IsDesktopBrowserForwardShellViewCmd(WORD Cmd)
|
||||
{
|
||||
// Note: The normal CShellBrowser forwards the entire FCIDM_SHVIEWFIRST..LAST range, we do not.
|
||||
// Note: Windows allows FCIDM_SHVIEW_SHOWINGROUPS but we don't support it nor does it make sense.
|
||||
return (FCIDM_SHVIEW_CREATELINK <= Cmd && Cmd <= FCIDM_SHVIEW_DESELECTALL) ||
|
||||
(FCIDM_SHVIEW_ARRANGE_AUTO <= Cmd && Cmd <= FCIDM_SHVIEW_ARRANGE_AUTOGRID) ||
|
||||
(Cmd == FCIDM_SHVIEW_REFRESH);
|
||||
}
|
||||
|
||||
class CDesktopBrowser :
|
||||
public CWindowImpl<CDesktopBrowser, CWindow, CFrameWinTraits>,
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
|
@ -399,8 +408,11 @@ LRESULT CDesktopBrowser::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
|
|||
if (m_ShellView)
|
||||
m_ShellView->Refresh();
|
||||
break;
|
||||
default:
|
||||
if (IsDesktopBrowserForwardShellViewCmd(LOWORD(wParam)) && m_hWndShellView)
|
||||
return SendMessageW(m_hWndShellView, uMsg, wParam, lParam);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue