mirror of
https://github.com/reactos/reactos.git
synced 2025-07-16 06:34:02 +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:
parent
80c7746313
commit
fd94119fa8
6 changed files with 168 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue