mirror of
https://github.com/reactos/reactos.git
synced 2025-07-06 07:31:21 +00:00
[RSHELL]
* CFocusManager: Try to fix some weird behaviour. * CMergedFolder: Downgrade some prints to TRACEs, and implement a couple methods needed by some debugging code. * Activate merged folders by default. TODO: implement the filtering of the "Programs" submenu, and use it for the real Programs menu item. [SHELL32] * defcontextmenu.cpp: Make a copy of the apidl array before storing it for later, since it may be a pointer to the stack which may not be available later. Fixes the merged folders not working on clicks and context menu. * shlmenu.cpp: While debugging, I made Shell_MergeMenus closer to WINE's. svn path=/branches/shell-experiments/; revision=63702
This commit is contained in:
parent
2ac4637056
commit
0ffe346179
8 changed files with 95 additions and 37 deletions
|
@ -63,7 +63,7 @@ HRESULT CMenuToolbarBase::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
|
|||
return OnPagerCalcSize(reinterpret_cast<LPNMPGCALCSIZE>(hdr));
|
||||
|
||||
case TBN_DROPDOWN:
|
||||
return OnCommand(reinterpret_cast<LPNMTOOLBAR>(hdr)->iItem, 0, theResult);
|
||||
return ProcessClick(reinterpret_cast<LPNMTOOLBAR>(hdr)->iItem);
|
||||
|
||||
case TBN_HOTITEMCHANGE:
|
||||
//return OnHotItemChange(reinterpret_cast<LPNMTBHOTITEM>(hdr), theResult);
|
||||
|
@ -798,11 +798,10 @@ HRESULT CMenuToolbarBase::TrackContextMenu(IContextMenu* contextMenu, POINT pt)
|
|||
return m_menuBand->_TrackContextMenu(contextMenu, pt.x, pt.y);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theResult)
|
||||
HRESULT CMenuToolbarBase::ProcessClick(INT iItem)
|
||||
{
|
||||
if (m_disableMouseTrack)
|
||||
{
|
||||
*theResult = 1;
|
||||
TRACE("Item click prevented by DisableMouseTrack\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -814,10 +813,6 @@ HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theRe
|
|||
return S_FALSE;
|
||||
}
|
||||
|
||||
*theResult = 0;
|
||||
|
||||
INT iItem = (INT)wParam;
|
||||
|
||||
if (PopupItem(iItem, FALSE) == S_OK)
|
||||
{
|
||||
TRACE("PopupItem returned S_OK\n");
|
||||
|
@ -829,28 +824,26 @@ HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theRe
|
|||
return m_menuBand->_MenuItemHotTrack(MPOS_EXECUTE);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::MenuBarMouseDown(INT item)
|
||||
HRESULT CMenuToolbarBase::MenuBarMouseDown(INT iIndex)
|
||||
{
|
||||
LRESULT theResult;
|
||||
TBBUTTON btn;
|
||||
|
||||
if (m_initFlags & SMINIT_VERTICAL)
|
||||
return S_OK;
|
||||
|
||||
SendMessage(m_hwndToolbar, TB_GETBUTTON, item, reinterpret_cast<LPARAM>(&btn));
|
||||
return OnCommand(btn.idCommand, 0, &theResult);
|
||||
::SendMessageW(m_hwndToolbar, TB_GETBUTTON, iIndex, reinterpret_cast<LPARAM>(&btn));
|
||||
return ProcessClick(btn.idCommand);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::MenuBarMouseUp(INT item)
|
||||
HRESULT CMenuToolbarBase::MenuBarMouseUp(INT iIndex)
|
||||
{
|
||||
LRESULT theResult;
|
||||
TBBUTTON btn;
|
||||
|
||||
if (!(m_initFlags & SMINIT_VERTICAL))
|
||||
return S_OK;
|
||||
|
||||
SendMessage(m_hwndToolbar, TB_GETBUTTON, item, reinterpret_cast<LPARAM>(&btn));
|
||||
return OnCommand(btn.idCommand, 0, &theResult);
|
||||
::SendMessageW(m_hwndToolbar, TB_GETBUTTON, iIndex, reinterpret_cast<LPARAM>(&btn));
|
||||
return ProcessClick(btn.idCommand);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::ExecuteItem(INT iItem)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue