mirror of
https://github.com/reactos/reactos.git
synced 2025-05-27 21:18:15 +00:00
[rshell]
- CStartMenu: add a test flag that makes the start menu show its submenus using SMIF_TRACKPOPUP in order to show how CMenuBand can use TrackPopupMenu svn path=/branches/shell-experiments/; revision=62238
This commit is contained in:
parent
b42655951c
commit
46e9b4d1e3
1 changed files with 13 additions and 2 deletions
|
@ -18,6 +18,8 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define TEST_TRACKPOPUPMENU_SUBMENUS
|
||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
|
|
||||||
/* NOTE: The following constants *MUST NOT* be changed because
|
/* NOTE: The following constants *MUST NOT* be changed because
|
||||||
|
@ -47,6 +49,7 @@
|
||||||
* 1. append the start menu contents from all users
|
* 1. append the start menu contents from all users
|
||||||
* 2. implement the context menu for start menu entries (programs, control panel, network connetions, printers)
|
* 2. implement the context menu for start menu entries (programs, control panel, network connetions, printers)
|
||||||
* 3. filter out programs folder from the shell folder part of the start menu
|
* 3. filter out programs folder from the shell folder part of the start menu
|
||||||
|
* 4. showing the programs start menu is SLOW compared to windows. this needs some investigation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class CShellMenuCallback :
|
class CShellMenuCallback :
|
||||||
|
@ -72,7 +75,11 @@ private:
|
||||||
hr = IUnknown_GetSite(m_pDeskBar, IID_PPV_ARG(ITrayPriv, &m_pTrayPriv));
|
hr = IUnknown_GetSite(m_pDeskBar, IID_PPV_ARG(ITrayPriv, &m_pTrayPriv));
|
||||||
hr = IUnknown_GetWindow(m_pTrayPriv, &m_hwndTray);
|
hr = IUnknown_GetWindow(m_pTrayPriv, &m_hwndTray);
|
||||||
hr = m_pTrayPriv->AppendMenuW(&hmenu);
|
hr = m_pTrayPriv->AppendMenuW(&hmenu);
|
||||||
|
#ifndef TEST_TRACKPOPUPMENU_SUBMENUS
|
||||||
hr = m_pShellMenu->SetMenu(hmenu, NULL, SMSET_BOTTOM);
|
hr = m_pShellMenu->SetMenu(hmenu, NULL, SMSET_BOTTOM);
|
||||||
|
#else
|
||||||
|
hr = m_pShellMenu->SetMenu(hmenu, m_hwndTray, SMSET_BOTTOM);
|
||||||
|
#endif
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -106,8 +113,12 @@ private:
|
||||||
|
|
||||||
if (iconIndex)
|
if (iconIndex)
|
||||||
{
|
{
|
||||||
psminfo->dwMask = SMIM_ICON;
|
if ((psminfo->dwMask & SMIM_ICON) != 0)
|
||||||
psminfo->iIcon = Shell_GetCachedImageIndex(L"shell32.dll", iconIndex, FALSE);
|
psminfo->iIcon = Shell_GetCachedImageIndex(L"shell32.dll", iconIndex, FALSE);
|
||||||
|
#ifdef TEST_TRACKPOPUPMENU_SUBMENUS
|
||||||
|
if ((psminfo->dwMask & SMIM_FLAGS) != 0)
|
||||||
|
psminfo->dwFlags |= SMIF_TRACKPOPUP;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue