[BROWSEUI]

* Make the CBandSiteMenu class actually insert the Toolbars menu, even if it's not yet implemented. This fills the top of the taskbar context menu instead of leaving an ugly separator at the top.

svn path=/trunk/; revision=65566
This commit is contained in:
David Quintana
2014-12-05 16:41:18 +00:00
parent 561200f6d3
commit 63a134ffc1
4 changed files with 53 additions and 8 deletions
+36 -8
View File
@@ -31,38 +31,66 @@ CBandSiteMenu::~CBandSiteMenu()
HRESULT STDMETHODCALLTYPE CBandSiteMenu::SetOwner(IUnknown *pOwner)
{
FIXME("(%p, %p)\n", this, pOwner);
return E_NOTIMPL;
TRACE("CBandSiteMenu::SetOwner(%p, %p)\n", this, pOwner);
m_Owner = pOwner;
return S_OK;
}
HRESULT STDMETHODCALLTYPE CBandSiteMenu::QueryContextMenu(
HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
{
FIXME("(%p, %p, %u, %u, %u, 0x%x)\n", this, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
BOOL ret;
TRACE("CBandSiteMenu::QueryContextMenu(%p, %p, %u, %u, %u, 0x%x)\n", this, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
HMENU hm = LoadMenuW(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDM_TASKBAR_TOOLBARS));
if (!hm)
return HRESULT_FROM_WIN32(GetLastError());
MENUITEMINFOW mii = { 0 };
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE | MIIM_STRING | MIIM_SUBMENU;
ret = GetMenuItemInfoW(hm, 0, TRUE, &mii);
if (!hm)
return HRESULT_FROM_WIN32(GetLastError());
mii.dwTypeData = new WCHAR[mii.cch + 1];
mii.cch = mii.cch + 1;
ret = GetMenuItemInfoW(hm, 0, TRUE, &mii);
if (!hm)
return HRESULT_FROM_WIN32(GetLastError());
ret = InsertMenuItemW(hmenu, 0, TRUE, &mii);
delete mii.dwTypeData;
RemoveMenu(hm, 0, MF_BYPOSITION);
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CBandSiteMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
{
FIXME("(%p, %p)\n", this, lpici);
return E_NOTIMPL;
FIXME("CBandSiteMenu::InvokeCommand is UNIMPLEMENTED (%p, %p)\n", this, lpici);
return S_OK;
}
HRESULT STDMETHODCALLTYPE CBandSiteMenu::GetCommandString(UINT_PTR idCmd, UINT uType,
UINT *pwReserved, LPSTR pszName, UINT cchMax)
{
FIXME("(%p, %p, %u, %p, %p, %u)\n", this, idCmd, uType, pwReserved, pszName, cchMax);
FIXME("CBandSiteMenu::GetCommandString is UNIMPLEMENTED (%p, %p, %u, %p, %p, %u)\n", this, idCmd, uType, pwReserved, pszName, cchMax);
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CBandSiteMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
FIXME("(%p, %u, %p, %p)\n", this, uMsg, wParam, lParam);
FIXME("CBandSiteMenu::HandleMenuMsg is UNIMPLEMENTED (%p, %u, %p, %p)\n", this, uMsg, wParam, lParam);
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE CBandSiteMenu::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
{
FIXME("(%p, %u, %p, %p, %p)\n", this, uMsg, wParam, lParam, plResult);
FIXME("CBandSiteMenu::HandleMenuMsg2 is UNIMPLEMENTED(%p, %u, %p, %p, %p)\n", this, uMsg, wParam, lParam, plResult);
return E_NOTIMPL;
}
@@ -28,6 +28,7 @@ class CBandSiteMenu :
public IContextMenu3,
public IShellService
{
CComPtr<IUnknown> m_Owner;
public:
CBandSiteMenu();
~CBandSiteMenu();
+11
View File
@@ -95,6 +95,17 @@ BEGIN
END
END
IDM_TASKBAR_TOOLBARS MENUEX
BEGIN
POPUP "&Toolbars", -1, MFT_STRING, MFS_ENABLED, 0
BEGIN
MENUITEM "&Desktop", IDM_TASKBAR_TOOLBARS_DESKTOP, MFT_STRING, MFS_GRAYED
MENUITEM "&Quick Launch", IDM_TASKBAR_TOOLBARS_QUICKLAUNCH, MFT_STRING, MFS_GRAYED
MENUITEM "", -1, MFT_SEPARATOR, MFS_ENABLED
MENUITEM "&New Toolbar...", IDM_TASKBAR_TOOLBARS_NEW, MFT_STRING, MFS_GRAYED
END
END
/* Dialogs */
IDD_CUSTOMIZETOOLBAREX DIALOGEX 0, 0, 357, 33
+5
View File
@@ -57,6 +57,11 @@
#define IDM_HELP_ISTHISCOPYLEGAL 0xA104
#define IDM_HELP_ABOUT 0xA102
#define IDM_TASKBAR_TOOLBARS 268
#define IDM_TASKBAR_TOOLBARS_DESKTOP 3
#define IDM_TASKBAR_TOOLBARS_QUICKLAUNCH 4
#define IDM_TASKBAR_TOOLBARS_NEW 1
#define IDM_GOTO_TRAVEL_FIRST 0xA141
#define IDM_GOTO_TRAVEL_LAST 0xA151
#define IDM_GOTO_TRAVEL_SEP IDM_GOTO_TRAVEL_FIRST