mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[RSHELL]
* Change the way the menu items are activated. Now the menubar activates on mouse down, and the other items activate on mouse up. Not everything works perfectly yet, but it will eventually allow proper usage of the shell menus by keeping the mouse button down. I believe this is also the way to go to avoid the "instant reopening" of the menus when trying to close them. svn path=/branches/shell-experiments/; revision=63671
This commit is contained in:
@@ -49,7 +49,8 @@ HRESULT CMenuToolbarBase::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
return OnCommand(wParam, lParam, theResult);
|
||||
//return OnCommand(wParam, lParam, theResult);
|
||||
return S_OK;
|
||||
|
||||
case WM_NOTIFY:
|
||||
hdr = reinterpret_cast<LPNMHDR>(lParam);
|
||||
@@ -828,6 +829,30 @@ HRESULT CMenuToolbarBase::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT *theRe
|
||||
return m_menuBand->_MenuItemHotTrack(MPOS_EXECUTE);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::MenuBarMouseDown(INT item)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::MenuBarMouseUp(INT item)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
HRESULT CMenuToolbarBase::ExecuteItem(INT iItem)
|
||||
{
|
||||
this->m_menuBand->_KillPopupTimers();
|
||||
|
||||
Reference in New Issue
Block a user