ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2014
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
464 discussions
Start a n
N
ew thread
[dquintana] 62262: [RSHELL] * CMenuBand: Implement rudimentary support for changing the hot item with the keyboard (up/down). The code can probable be simpler, and some corner cases need to be fixe...
by dquintana@svn.reactos.org
Author: dquintana Date: Thu Feb 20 12:12:42 2014 New Revision: 62262 URL:
http://svn.reactos.org/svn/reactos?rev=62262&view=rev
Log: [RSHELL] * CMenuBand: Implement rudimentary support for changing the hot item with the keyboard (up/down). The code can probable be simpler, and some corner cases need to be fixed, but it works. * CMenuDeskBar: Attempt to redesign OnSelect to better match the windows behaviour, which is still mostly unknown. * Make the log results more readable. CORE-7881 Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp branches/shell-experiments/base/shell/rshell/logging/CMenuBandWrap.cpp branches/shell-experiments/base/shell/rshell/logging/CMenuDeskBarWrap.cpp branches/shell-experiments/base/shell/rshell/logging/CMenuSiteWrap.cpp branches/shell-experiments/base/shell/rshell/wraplog.cpp branches/shell-experiments/base/shell/rshell/wraplog.h Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -58,6 +58,8 @@ HRESULT PopupSubMenu(UINT index, HMENU menu); HRESULT DoContextMenu(IContextMenu* contextMenu); + HRESULT ChildTrack(DWORD dwSelectType); + static LRESULT CALLBACK s_SubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); protected: @@ -153,6 +155,9 @@ CMenuFocusManager * m_focusManager; + CMenuToolbarBase * m_hotBar; + INT m_hotItem; + public: // *** IDeskBand methods *** @@ -241,6 +246,8 @@ HRESULT CallCBWithPidl(LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam); HRESULT TrackPopup(HMENU popup, INT x, INT y); HRESULT GetTopLevelWindow(HWND*topLevel); + HRESULT OnHotItemChanged(CMenuToolbarBase * tb, INT id); + HRESULT ChildTrack(DWORD reason); BOOL UseBigIcons() { return m_useBigIcons; @@ -418,19 +425,19 @@ case VK_MENU: case VK_LMENU: case VK_RMENU: - m_currentBand->OnSelect(MPOS_FULLCANCEL); + m_currentBand->ChildTrack(MPOS_FULLCANCEL); break; case VK_LEFT: - m_currentBand->OnSelect(MPOS_SELECTLEFT); + m_currentBand->ChildTrack(MPOS_SELECTLEFT); break; case VK_RIGHT: - m_currentBand->OnSelect(MPOS_SELECTRIGHT); + m_currentBand->ChildTrack(MPOS_SELECTRIGHT); break; case VK_UP: - //m_currentBand->ChildTrack(VK_UP); + m_currentBand->ChildTrack(VK_UP); break; case VK_DOWN: - //m_currentBand->ChildTrack(VK_DOWN); + m_currentBand->ChildTrack(VK_DOWN); break; } break; @@ -676,6 +683,9 @@ if (hot->dwFlags & HICF_LEAVING) { KillTimer(m_hwnd, TIMERID_HOTTRACK); + m_hotItem = -1; + m_menuBand->OnHotItemChanged(NULL, -1); + m_menuBand->ChildTrack(MPOS_CHILDTRACKING); } else if (m_hotItem != hot->idNew) { @@ -684,13 +694,14 @@ DWORD elapsed = 0; SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &elapsed, 0); - m_hotItem = hot->idNew; SetTimer(m_hwnd, TIMERID_HOTTRACK, elapsed, NULL); } - } - - m_menuBand->OnSelect(MPOS_CHILDTRACKING); + + m_hotItem = hot->idNew; + m_menuBand->OnHotItemChanged(this, m_hotItem); + m_menuBand->ChildTrack(MPOS_CHILDTRACKING); + } return S_OK; } @@ -817,6 +828,95 @@ { m_menuBand->OnSelect(MPOS_EXECUTE); return S_OK; +} + + +HRESULT CMenuToolbarBase::ChildTrack(DWORD dwSelectType) +{ + int prev = SendMessage(m_hwnd, TB_GETHOTITEM, 0, 0); + int index = -1; + + if (dwSelectType != 0xFFFFFFFF) + { + int count = SendMessage(m_hwnd, TB_BUTTONCOUNT, 0, 0); + + if (m_hotItem >= 0) + { + TBBUTTONINFO info = { 0 }; + info.cbSize = sizeof(TBBUTTONINFO); + info.dwMask = 0; + index = SendMessage(m_hwnd, TB_GETBUTTONINFO, m_hotItem, reinterpret_cast<LPARAM>(&info)); + } + + if (dwSelectType == VK_HOME) + { + index = 0; + dwSelectType = VK_DOWN; + } + else if (dwSelectType == VK_END) + { + index = count - 1; + dwSelectType = VK_UP; + } + else if (index < 0) + { + if (dwSelectType == VK_UP) + { + index = count - 1; + } + else if (dwSelectType == VK_DOWN) + { + index = 0; + } + } + else + { + if (dwSelectType == VK_UP) + { + index--; + } + else if (dwSelectType == VK_DOWN) + { + index++; + } + } + + TBBUTTON btn = { 0 }; + while (index >= 0 && index < count) + { + DWORD res = SendMessage(m_hwnd, TB_GETBUTTON, index, reinterpret_cast<LPARAM>(&btn)); + if (!res) + return E_FAIL; + + if (btn.dwData) + { + m_hotItem = btn.idCommand; + if (prev != index) + { + SendMessage(m_hwnd, TB_SETHOTITEM, index, 0); + return m_menuBand->OnHotItemChanged(this, m_hotItem); + } + return S_OK; + } + + if (dwSelectType == VK_UP) + { + index--; + } + else if (dwSelectType == VK_DOWN) + { + index++; + } + } + } + + m_hotItem = -1; + if (prev != index) + { + SendMessage(m_hwnd, TB_SETHOTITEM, -1, 0); + m_menuBand->OnHotItemChanged(NULL, -1); + } + return S_FALSE; } BOOL @@ -1026,7 +1126,7 @@ tbb.fsStyle |= BTNS_DROPDOWN; } - tbb.idCommand = i++; + tbb.idCommand = ++i; tbb.iString = (INT_PTR) MenuString; tbb.iBitmap = index; tbb.dwData = reinterpret_cast<DWORD_PTR>(ILClone(item)); @@ -1187,7 +1287,9 @@ m_psmc(NULL), m_staticToolbar(NULL), m_SFToolbar(NULL), - m_useBigIcons(FALSE) + m_useBigIcons(FALSE), + m_hotBar(NULL), + m_hotItem(-1) { m_focusManager = CMenuFocusManager::AcquireManager(); } @@ -1561,25 +1663,31 @@ HRESULT STDMETHODCALLTYPE CMenuBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg) { HRESULT hr; - CComPtr<IMenuPopup> pmp; hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &pmp)); if (FAILED(hr)) return hr; - hr = pmp->SetSubMenu(this, TRUE); - if (FAILED(hr)) - return hr; - - CComPtr<IOleWindow> pTopLevelWindow; - hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IOleWindow, &pTopLevelWindow)); - if (FAILED(hr)) - return hr; - - hr = pTopLevelWindow->GetWindow(&m_topLevelWindow); - if (FAILED(hr)) - return hr; + hr = pmp->SetSubMenu(this, fActivate); + if (FAILED(hr)) + return hr; + + if (fActivate) + { + CComPtr<IOleWindow> pTopLevelWindow; + hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IOleWindow, &pTopLevelWindow)); + if (FAILED(hr)) + return hr; + + hr = pTopLevelWindow->GetWindow(&m_topLevelWindow); + if (FAILED(hr)) + return hr; + } + else + { + m_topLevelWindow = NULL; + } return S_FALSE; } @@ -1672,11 +1780,6 @@ HRESULT STDMETHODCALLTYPE CMenuBand::OnSelect(DWORD dwSelectType) { - CComPtr<IMenuPopup> pmp; - HRESULT hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &pmp)); - if (FAILED(hr)) - return hr; - pmp->OnSelect(dwSelectType); return S_OK; } @@ -1998,4 +2101,81 @@ { *topLevel = m_topLevelWindow; return S_OK; -} +} + +HRESULT CMenuBand::OnHotItemChanged(CMenuToolbarBase * tb, INT id) +{ + if (m_hotBar && m_hotBar != tb) + m_hotBar->ChildTrack(-1); + m_hotBar = tb; + m_hotItem = id; + return S_OK; +} + +HRESULT CMenuBand::ChildTrack(DWORD dwSelectType) +{ + HRESULT hr; + if (dwSelectType == VK_DOWN) + { + if (m_SFToolbar && (m_hotBar == m_SFToolbar || m_hotBar == NULL)) + { + hr = m_SFToolbar->ChildTrack(dwSelectType); + if (hr == S_FALSE) + { + if (m_staticToolbar) + return m_staticToolbar->ChildTrack(VK_HOME); + else + return m_SFToolbar->ChildTrack(VK_HOME); + } + return hr; + } + else if (m_staticToolbar && m_hotBar == m_staticToolbar) + { + hr = m_staticToolbar->ChildTrack(dwSelectType); + if (hr == S_FALSE) + { + if (m_SFToolbar) + return m_SFToolbar->ChildTrack(VK_HOME); + else + return m_staticToolbar->ChildTrack(VK_HOME); + } + return hr; + } + } + else if (dwSelectType == VK_UP) + { + if (m_staticToolbar && (m_hotBar == m_staticToolbar || m_hotBar == NULL)) + { + hr = m_staticToolbar->ChildTrack(dwSelectType); + if (hr == S_FALSE) + { + if (m_SFToolbar) + return m_SFToolbar->ChildTrack(VK_END); + else + return m_staticToolbar->ChildTrack(VK_END); + } + return hr; + } + else if (m_SFToolbar && m_hotBar == m_SFToolbar) + { + hr = m_SFToolbar->ChildTrack(dwSelectType); + if (hr == S_FALSE) + { + if (m_staticToolbar) + return m_staticToolbar->ChildTrack(VK_END); + else + return m_SFToolbar->ChildTrack(VK_END); + } + return hr; + } + } + else + { + CComPtr<IMenuPopup> pmp; + hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &pmp)); + if (FAILED(hr)) + return hr; + pmp->OnSelect(dwSelectType); + } + return S_OK; +} Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -228,9 +228,6 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::QueryService(REFGUID guidService, REFIID riid, void **ppvObject) { - if (m_Site == NULL) - return E_FAIL; - if (IsEqualGUID(guidService, SID_SMenuPopup) || IsEqualGUID(guidService, SID_SMenuBandParent) || IsEqualGUID(guidService, SID_STopLevelBrowser)) @@ -238,6 +235,9 @@ return this->QueryInterface(riid, ppvObject); } + if (m_Site == NULL) + return E_NOINTERFACE; + return IUnknown_QueryService(m_Site, guidService, riid, ppvObject); } @@ -333,8 +333,6 @@ LRESULT CMenuDeskBar::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - HRESULT hr; - if (m_Client) { RECT rc; @@ -538,31 +536,13 @@ { CComPtr<IDeskBarClient> dbc; HRESULT hr; - - bool bubbleUp = false; - bool cancel = false; switch (dwSelectType) { + case MPOS_EXECUTE: case MPOS_FULLCANCEL: - case MPOS_EXECUTE: - bubbleUp = true; - cancel = true; - break; case MPOS_CANCELLEVEL: - cancel = true; - break; - case MPOS_SELECTLEFT: - case MPOS_SELECTRIGHT: - // if unhandled, spread upwards? - bubbleUp = true; - break; - case MPOS_CHILDTRACKING: - break; - } - - if (cancel) - { + hr = m_Client->QueryInterface(IID_PPV_ARG(IDeskBarClient, &dbc)); if (FAILED(hr)) return hr; @@ -574,12 +554,23 @@ SetWindowPos(m_hWnd, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); UIActivateIO(FALSE, NULL); - } - - if (bubbleUp && m_SubMenuParent) - { - hr = m_SubMenuParent->OnSelect(MPOS_CANCELLEVEL); // why?? - return hr; + + if (dwSelectType == MPOS_CANCELLEVEL) + break; + + dwSelectType = MPOS_CANCELLEVEL; + case MPOS_SELECTLEFT: + case MPOS_SELECTRIGHT: + /*CComPtr<IMenuPopup> pmp; + hr = IUnknown_QueryService(m_Client, SID_SMenuBandChild, IID_PPV_ARG(IMenuPopup, &pmp)); + if (FAILED(hr)) + return hr;*/ + + hr = m_SubMenuParent->OnSelect(dwSelectType); + if (FAILED(hr)) + return hr; + case MPOS_CHILDTRACKING: + break; } return S_OK; Modified: branches/shell-experiments/base/shell/rshell/logging/CMenuBandWrap.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/logging/CMenuBandWrap.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/logging/CMenuBandWrap.cpp [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -60,6 +60,8 @@ CComPtr<IShellMenu > m_IShellMenu; CComPtr<IWinEventHandler > m_IWinEventHandler; CComPtr<IShellMenuAcc > m_IShellMenuAcc; + + IUnknown * m_site; public: @@ -247,7 +249,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetSubMenu()\n", this); HRESULT hr = m_IShellMenu2->GetSubMenu(); - WrapLogExit("CMenuBandWrap::GetSubMenu() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetSubMenu()", hr); return hr; } @@ -255,7 +257,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetToolbar()\n", this); HRESULT hr = m_IShellMenu2->SetToolbar(); - WrapLogExit("CMenuBandWrap::SetToolbar() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetToolbar()", hr); return hr; } @@ -263,7 +265,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetMinWidth()\n", this); HRESULT hr = m_IShellMenu2->SetMinWidth(); - WrapLogExit("CMenuBandWrap::SetMinWidth() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetMinWidth()", hr); return hr; } @@ -271,7 +273,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetNoBorder()\n", this); HRESULT hr = m_IShellMenu2->SetNoBorder(); - WrapLogExit("CMenuBandWrap::SetNoBorder() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetNoBorder()", hr); return hr; } @@ -279,7 +281,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetTheme()\n", this); HRESULT hr = m_IShellMenu2->SetTheme(); - WrapLogExit("CMenuBandWrap::SetTheme() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetTheme()", hr); return hr; } @@ -289,7 +291,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetTop()\n", this); HRESULT hr = m_IShellMenuAcc->GetTop(); - WrapLogExit("CMenuBandWrap::GetTop() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetTop()", hr); return hr; } @@ -297,7 +299,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBottom()\n", this); HRESULT hr = m_IShellMenuAcc->GetBottom(); - WrapLogExit("CMenuBandWrap::GetBottom() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBottom()", hr); return hr; } @@ -305,7 +307,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBottom()\n", this); HRESULT hr = m_IShellMenuAcc->GetBottom(); - WrapLogExit("CMenuBandWrap::GetBottom() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBottom()", hr); return hr; } @@ -313,7 +315,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBottom()\n", this); HRESULT hr = m_IShellMenuAcc->GetBottom(); - WrapLogExit("CMenuBandWrap::GetBottom() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBottom()", hr); return hr; } @@ -321,7 +323,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBottom()\n", this); HRESULT hr = m_IShellMenuAcc->GetBottom(); - WrapLogExit("CMenuBandWrap::GetBottom() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBottom()", hr); return hr; } @@ -329,7 +331,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBottom()\n", this); HRESULT hr = m_IShellMenuAcc->GetBottom(); - WrapLogExit("CMenuBandWrap::GetBottom() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBottom()", hr); return hr; } @@ -337,7 +339,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBottom()\n", this); HRESULT hr = m_IShellMenuAcc->GetBottom(); - WrapLogExit("CMenuBandWrap::GetBottom() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBottom()", hr); return hr; } @@ -346,7 +348,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetBandInfo(DWORD dwBandID=%d, DWORD dwViewMode=%d, DESKBANDINFO *pdbi=%p)\n", this, dwBandID, dwViewMode, pdbi); HRESULT hr = m_IDeskBand->GetBandInfo(dwBandID, dwViewMode, pdbi); - WrapLogExit("CMenuBandWrap::GetBandInfo() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetBandInfo()", hr); return hr; } @@ -355,7 +357,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::ShowDW(BOOL fShow=%d)\n", this, fShow); HRESULT hr = m_IDockingWindow->ShowDW(fShow); - WrapLogExit("CMenuBandWrap::ShowDW() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::ShowDW()", hr); return hr; } @@ -363,17 +365,17 @@ { WrapLogEnter("CMenuBandWrap<%p>::CloseDW(DWORD dwReserved=%d)\n", this, dwReserved); HRESULT hr = m_IDockingWindow->CloseDW(dwReserved); - WrapLogExit("CMenuBandWrap::CloseDW() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::CloseDW()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) { WrapLogEnter("CMenuBandWrap<%p>::ResizeBorderDW(LPCRECT prcBorder=%p, IUnknown *punkToolbarSite=%p, BOOL fReserved=%d)\n", this, prcBorder, punkToolbarSite, fReserved); - if (prcBorder) WrapLogMsg("*prcBorder=%s\n", Wrap(*prcBorder)); + if (prcBorder) WrapLogPre("*prcBorder=%s\n", Wrap(*prcBorder)); HRESULT hr = m_IDockingWindow->ResizeBorderDW(prcBorder, punkToolbarSite, fReserved); - if (prcBorder) WrapLogMsg("*prcBorder=%s\n", Wrap(*prcBorder)); - WrapLogExit("CMenuBandWrap::ResizeBorderDW() = %08x\n", hr); + if (prcBorder) WrapLogPost("*prcBorder=%s\n", Wrap(*prcBorder)); + WrapLogExit("CMenuBandWrap::ResizeBorderDW()", hr); return hr; } @@ -382,15 +384,15 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetWindow(HWND *phwnd=%p)\n", this, phwnd); HRESULT hr = m_IOleWindow->GetWindow(phwnd); - if (phwnd) WrapLogMsg("*phwnd=%p\n", *phwnd); - WrapLogExit("CMenuBandWrap::GetWindow() = %08x\n", hr); + if (phwnd) WrapLogPost("*phwnd=%p\n", *phwnd); + WrapLogExit("CMenuBandWrap::GetWindow()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::ContextSensitiveHelp(BOOL fEnterMode) { WrapLogEnter("CMenuBandWrap<%p>::ContextSensitiveHelp(BOOL fEnterMode=%d)\n", this, fEnterMode); HRESULT hr = m_IOleWindow->ContextSensitiveHelp(fEnterMode); - WrapLogExit("CMenuBandWrap::ContextSensitiveHelp() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::ContextSensitiveHelp()", hr); return hr; } @@ -399,7 +401,7 @@ { //WrapLogEnter("CMenuBandWrap<%p>::OnWinEvent(HWND hWnd=%p, UINT uMsg=%u, WPARAM wParam=%08x, LPARAM lParam=%08x, LRESULT *theResult=%p)\n", this, hWnd, uMsg, wParam, lParam, theResult); HRESULT hr = m_IWinEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult); - //WrapLogExit("CMenuBandWrap::OnWinEvent() = %08x\n", hr); + //WrapLogExit("CMenuBandWrap::OnWinEvent()", hr); return hr; } @@ -407,7 +409,7 @@ { //WrapLogEnter("CMenuBandWrap<%p>::IsWindowOwner(HWND hWnd=%08x)\n", this, hWnd); HRESULT hr = m_IWinEventHandler->IsWindowOwner(hWnd); - //WrapLogExit("CMenuBandWrap::IsWindowOwner() = %08x\n", hr); + //WrapLogExit("CMenuBandWrap::IsWindowOwner()", hr); return hr; } @@ -416,7 +418,8 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetSite(IUnknown *pUnkSite=%p)\n", this, pUnkSite); HRESULT hr = m_IObjectWithSite->SetSite(pUnkSite); - WrapLogExit("CMenuBandWrap::SetSite() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetSite()", hr); + m_site = pUnkSite; return hr; } @@ -424,8 +427,8 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetSite(REFIID riid=%s, PVOID *ppvSite=%p)\n", this, Wrap(riid), ppvSite); HRESULT hr = m_IObjectWithSite->GetSite(riid, ppvSite); - if (ppvSite) WrapLogMsg("*ppvSite=%p\n", *ppvSite); - WrapLogExit("CMenuBandWrap::GetSite() = %08x\n", hr); + if (ppvSite) WrapLogPost("*ppvSite=%p\n", *ppvSite); + WrapLogExit("CMenuBandWrap::GetSite()", hr); return hr; } @@ -434,7 +437,17 @@ { WrapLogEnter("CMenuBandWrap<%p>::UIActivateIO(BOOL fActivate=%d, LPMSG lpMsg=%p)\n", this, fActivate, lpMsg); HRESULT hr = m_IInputObject->UIActivateIO(fActivate, lpMsg); - WrapLogExit("CMenuBandWrap::UIActivateIO() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::UIActivateIO()", hr); + + HRESULT hrt; + CComPtr<IMenuPopup> pmp; + + hrt = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &pmp)); + if (FAILED(hrt)) + return hr; + + hrt = pmp->SetSubMenu(this, fActivate); + return hr; } @@ -442,16 +455,16 @@ { WrapLogEnter("CMenuBandWrap<%p>::HasFocusIO()\n", this); HRESULT hr = m_IInputObject->HasFocusIO(); - WrapLogExit("CMenuBandWrap::HasFocusIO() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::HasFocusIO()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::TranslateAcceleratorIO(LPMSG lpMsg) { WrapLogEnter("CMenuBandWrap<%p>::TranslateAcceleratorIO(LPMSG lpMsg=%p)\n", this, lpMsg); - if (lpMsg) WrapLogMsg("*lpMsg=%s\n", Wrap(*lpMsg)); + if (lpMsg) WrapLogPre("*lpMsg=%s\n", Wrap(*lpMsg)); HRESULT hr = m_IInputObject->TranslateAcceleratorIO(lpMsg); - WrapLogExit("CMenuBandWrap::TranslateAcceleratorIO() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::TranslateAcceleratorIO()", hr); return hr; } @@ -460,28 +473,28 @@ { WrapLogEnter("CMenuBandWrap<%p>::IsDirty()\n", this); HRESULT hr = m_IPersistStream->IsDirty(); - WrapLogExit("CMenuBandWrap::IsDirty() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::IsDirty()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::Load(IStream *pStm) { WrapLogEnter("CMenuBandWrap<%p>::Load(IStream *pStm=%p)\n", this, pStm); HRESULT hr = m_IPersistStream->Load(pStm); - WrapLogExit("CMenuBandWrap::Load() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::Load()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::Save(IStream *pStm, BOOL fClearDirty) { WrapLogEnter("CMenuBandWrap<%p>::Save(IStream *pStm=%p, BOOL fClearDirty=%d)\n", this, pStm, fClearDirty); HRESULT hr = m_IPersistStream->Save(pStm, fClearDirty); - WrapLogExit("CMenuBandWrap::Save() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::Save()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::GetSizeMax(ULARGE_INTEGER *pcbSize) { WrapLogEnter("CMenuBandWrap<%p>::GetSizeMax(ULARGE_INTEGER *pcbSize=%p)\n", this, pcbSize); HRESULT hr = m_IPersistStream->GetSizeMax(pcbSize); - WrapLogExit("CMenuBandWrap::GetSizeMax() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetSizeMax()", hr); return hr; } @@ -490,8 +503,8 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetClassID(CLSID *pClassID=%p)\n", this, pClassID); HRESULT hr = m_IPersist->GetClassID(pClassID); - if (pClassID) WrapLogMsg("*pClassID=%s\n", Wrap(*pClassID)); - WrapLogExit("CMenuBandWrap::GetClassID() = %08x\n", hr); + if (pClassID) WrapLogPost("*pClassID=%s\n", Wrap(*pClassID)); + WrapLogExit("CMenuBandWrap::GetClassID()", hr); return hr; } @@ -500,17 +513,17 @@ { WrapLogEnter("CMenuBandWrap<%p>::QueryStatus(const GUID *pguidCmdGroup=%p, ULONG cCmds=%u, prgCmds=%p, pCmdText=%p)\n", this, pguidCmdGroup, cCmds, prgCmds, pCmdText); HRESULT hr = m_IOleCommandTarget->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText); - if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); - WrapLogExit("CMenuBandWrap::QueryStatus() = %08x\n", hr); + if (pguidCmdGroup) WrapLogPost("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); + WrapLogExit("CMenuBandWrap::QueryStatus()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuBandWrap::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) { WrapLogEnter("CMenuBandWrap<%p>::Exec(const GUID *pguidCmdGroup=%p, DWORD nCmdID=%d, DWORD nCmdexecopt=%d, VARIANT *pvaIn=%p, VARIANT *pvaOut=%p)\n", this, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); - if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); + if (pguidCmdGroup) WrapLogPre("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); HRESULT hr = m_IOleCommandTarget->Exec(pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); - WrapLogExit("CMenuBandWrap::Exec() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::Exec()", hr); return hr; } @@ -521,56 +534,56 @@ if (IsEqualIID(guidService, SID_SMenuBandChild)) { - WrapLogMsg("SID is SID_SMenuBandChild. Using QueryInterface of self instead of wrapped object.\n"); + WrapLogPre("SID is SID_SMenuBandChild. Using QueryInterface of self instead of wrapped object.\n"); HRESULT hr = this->QueryInterface(riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); if (SUCCEEDED(hr)) { - WrapLogExit("CMenuBandWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuBandWrap::QueryService()", hr); return hr; } else { - WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n"); + WrapLogPre("QueryInterface on wrapper failed. Handing over to innter object.\n"); } } else if (IsEqualIID(guidService, SID_SMenuBandBottom)) { - WrapLogMsg("SID is SID_SMenuBandBottom. Using QueryInterface of self instead of wrapped object.\n"); + WrapLogPre("SID is SID_SMenuBandBottom. Using QueryInterface of self instead of wrapped object.\n"); HRESULT hr = this->QueryInterface(riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); if (SUCCEEDED(hr)) { - WrapLogExit("CMenuBandWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuBandWrap::QueryService()", hr); return hr; } else { - WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n"); + WrapLogPre("QueryInterface on wrapper failed. Handing over to innter object.\n"); } } else if (IsEqualIID(guidService, SID_SMenuBandBottomSelected)) { - WrapLogMsg("SID is SID_SMenuBandBottomSelected. Using QueryInterface of self instead of wrapped object.\n"); + WrapLogPre("SID is SID_SMenuBandBottomSelected. Using QueryInterface of self instead of wrapped object.\n"); HRESULT hr = this->QueryInterface(riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); if (SUCCEEDED(hr)) { - WrapLogExit("CMenuBandWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuBandWrap::QueryService()", hr); return hr; } else { - WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n"); + WrapLogPre("QueryInterface on wrapper failed. Handing over to innter object.\n"); } } else { - WrapLogMsg("SID not identified.\n"); + WrapLogPre("SID not identified.\n"); } HRESULT hr = m_IServiceProvider->QueryService(guidService, riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); - WrapLogExit("CMenuBandWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuBandWrap::QueryService()", hr); return hr; } @@ -580,7 +593,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::Popup(POINTL *ppt=%p, RECTL *prcExclude=%p, MP_POPUPFLAGS dwFlags=%08x)\n", this, ppt, prcExclude, dwFlags); HRESULT hr = m_IMenuPopup->Popup(ppt, prcExclude, dwFlags); - WrapLogExit("CMenuBandWrap::Popup() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::Popup()", hr); return hr; } @@ -588,7 +601,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::OnSelect(DWORD dwSelectType=%08x)\n", this, dwSelectType); HRESULT hr = m_IMenuPopup->OnSelect(dwSelectType); - WrapLogExit("CMenuBandWrap::OnSelect() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::OnSelect()", hr); return hr; } @@ -596,7 +609,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetSubMenu(IMenuPopup *pmp=%p, BOOL fSet=%d)\n", this, pmp, fSet); HRESULT hr = m_IMenuPopup->SetSubMenu(pmp, fSet); - WrapLogExit("CMenuBandWrap::SetSubMenu() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetSubMenu()", hr); return hr; } @@ -606,7 +619,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetClient(IUnknown *punkClient=%p)\n", this, punkClient); HRESULT hr = m_IDeskBar->SetClient(punkClient); - WrapLogExit("CMenuBandWrap::SetClient() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetClient()", hr); return hr; } @@ -614,8 +627,8 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetClient(IUnknown **ppunkClient=%p)\n", this, ppunkClient); HRESULT hr = m_IDeskBar->GetClient(ppunkClient); - if (ppunkClient) WrapLogMsg("*ppunkClient=%p\n", *ppunkClient); - WrapLogExit("CMenuBandWrap::GetClient() = %08x\n", hr); + if (ppunkClient) WrapLogPost("*ppunkClient=%p\n", *ppunkClient); + WrapLogExit("CMenuBandWrap::GetClient()", hr); return hr; } @@ -623,8 +636,8 @@ { WrapLogEnter("CMenuBandWrap<%p>::OnPosRectChangeDB(RECT *prc=%p)\n", this, prc); HRESULT hr = m_IDeskBar->OnPosRectChangeDB(prc); - if (prc) WrapLogMsg("*prc=%s\n", Wrap(*prc)); - WrapLogExit("CMenuBandWrap::OnPosRectChangeDB() = %08x\n", hr); + if (prc) WrapLogPost("*prc=%s\n", Wrap(*prc)); + WrapLogExit("CMenuBandWrap::OnPosRectChangeDB()", hr); return hr; } @@ -634,7 +647,7 @@ { //WrapLogEnter("CMenuBandWrap<%p>::IsMenuMessage(MSG *pmsg=%p)\n", this, pmsg); HRESULT hr = m_IMenuBand->IsMenuMessage(pmsg); - //WrapLogExit("CMenuBandWrap::IsMenuMessage() = %08x\n", hr); + //WrapLogExit("CMenuBandWrap::IsMenuMessage()", hr); return hr; } @@ -651,7 +664,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::Initialize(IShellMenuCallback *psmc=%p, UINT uId=%u, UINT uIdAncestor=%u, DWORD dwFlags=%08x)\n", this, psmc, uId, uIdAncestor, dwFlags); HRESULT hr = m_IShellMenu->Initialize(psmc, uId, uIdAncestor, dwFlags); - WrapLogExit("CMenuBandWrap::Initialize() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::Initialize()", hr); return hr; } @@ -659,11 +672,11 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetMenuInfo(IShellMenuCallback **ppsmc=%p, UINT *puId=%p, UINT *puIdAncestor=%p, DWORD *pdwFlags=%p)\n", this, ppsmc, puId, puIdAncestor, pdwFlags); HRESULT hr = m_IShellMenu->GetMenuInfo(ppsmc, puId, puIdAncestor, pdwFlags); - if (ppsmc) WrapLogMsg("*ppsmc=%p\n", *ppsmc); - if (puId) WrapLogMsg("*puId=%u\n", *puId); - if (puIdAncestor) WrapLogMsg("*puIdAncestor=%u\n", *puIdAncestor); - if (pdwFlags) WrapLogMsg("*pdwFlags=%08x\n", *pdwFlags); - WrapLogExit("CMenuBandWrap::GetMenuInfo() = %08x\n", hr); + if (ppsmc) WrapLogPost("*ppsmc=%p\n", *ppsmc); + if (puId) WrapLogPost("*puId=%u\n", *puId); + if (puIdAncestor) WrapLogPost("*puIdAncestor=%u\n", *puIdAncestor); + if (pdwFlags) WrapLogPost("*pdwFlags=%08x\n", *pdwFlags); + WrapLogExit("CMenuBandWrap::GetMenuInfo()", hr); return hr; } @@ -671,7 +684,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetShellFolder(IShellFolder *psf=%p, LPCITEMIDLIST pidlFolder=%p, HKEY hKey=%p, DWORD dwFlags=%08x)\n", this, psf, pidlFolder, hKey, dwFlags); HRESULT hr = m_IShellMenu->SetShellFolder(psf, pidlFolder, hKey, dwFlags); - WrapLogExit("CMenuBandWrap::SetShellFolder() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetShellFolder()", hr); return hr; } @@ -679,10 +692,10 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetShellFolder(DWORD *pdwFlags=%p, LPITEMIDLIST *ppidl=%p, REFIID riid=%s, void **ppv=%p)\n", this, pdwFlags, ppidl, Wrap(riid), ppv); HRESULT hr = m_IShellMenu->GetShellFolder(pdwFlags, ppidl, riid, ppv); - if (pdwFlags) WrapLogMsg("*pdwFlags=%08x\n", *pdwFlags); - if (ppidl) WrapLogMsg("*ppidl=%p\n", *ppidl); - if (ppv) WrapLogMsg("*ppv=%p\n", *ppv); - WrapLogExit("CMenuBandWrap::GetShellFolder() = %08x\n", hr); + if (pdwFlags) WrapLogPost("*pdwFlags=%08x\n", *pdwFlags); + if (ppidl) WrapLogPost("*ppidl=%p\n", *ppidl); + if (ppv) WrapLogPost("*ppv=%p\n", *ppv); + WrapLogExit("CMenuBandWrap::GetShellFolder()", hr); return hr; } @@ -690,7 +703,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetMenu(HMENU hmenu=%p, HWND hwnd=%p, DWORD dwFlags=%08x)\n", this, hmenu, hwnd, dwFlags); HRESULT hr = m_IShellMenu->SetMenu(hmenu, hwnd, dwFlags); - WrapLogExit("CMenuBandWrap::SetMenu() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::SetMenu()", hr); return hr; } @@ -698,10 +711,10 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetMenu(HMENU *phmenu=%p, HWND *phwnd=%p, DWORD *pdwFlags=%p)\n", this, phmenu, phwnd, pdwFlags); HRESULT hr = m_IShellMenu->GetMenu(phmenu, phwnd, pdwFlags); - if (phmenu) WrapLogMsg("*phmenu=%p\n", *phmenu); - if (phwnd) WrapLogMsg("*phwnd=%p\n", *phwnd); - if (pdwFlags) WrapLogMsg("*pdwFlags=%08x\n", *pdwFlags); - WrapLogExit("CMenuBandWrap::GetMenu() = %08x\n", hr); + if (phmenu) WrapLogPost("*phmenu=%p\n", *phmenu); + if (phwnd) WrapLogPost("*phwnd=%p\n", *phwnd); + if (pdwFlags) WrapLogPost("*pdwFlags=%08x\n", *pdwFlags); + WrapLogExit("CMenuBandWrap::GetMenu()", hr); return hr; } @@ -709,7 +722,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::InvalidateItem(LPSMDATA psmd=%p, DWORD dwFlags=%08x)\n", this, psmd, dwFlags); HRESULT hr = m_IShellMenu->InvalidateItem(psmd, dwFlags); - WrapLogExit("CMenuBandWrap::InvalidateItem() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::InvalidateItem()", hr); return hr; } @@ -717,7 +730,7 @@ { WrapLogEnter("CMenuBandWrap<%p>::GetState(LPSMDATA psmd=%p)\n", this, psmd); HRESULT hr = m_IShellMenu->GetState(psmd); - WrapLogExit("CMenuBandWrap::GetState() = %08x\n", hr); + WrapLogExit("CMenuBandWrap::GetState()", hr); return hr; } @@ -725,6 +738,6 @@ { WrapLogEnter("CMenuBandWrap<%p>::SetMenuToolbar(IUnknown *punk=%p, DWORD dwFlags=%08x)\n", this, punk, dwFlags); HRESULT hr = m_IShellMenu->SetMenuToolbar(punk, dwFlags); - WrapLogExit("CMenuBandWrap::SetMenuToolbar() = %08x\n", hr); - return hr; -} + WrapLogExit("CMenuBandWrap::SetMenuToolbar()", hr); + return hr; +} Modified: branches/shell-experiments/base/shell/rshell/logging/CMenuDeskBarWrap.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/logging/CMenuDeskBarWrap.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/logging/CMenuDeskBarWrap.cpp [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -174,7 +174,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::Popup(POINTL *ppt=%p, RECTL *prcExclude=%p, MP_POPUPFLAGS dwFlags=%08x)\n", this, ppt, prcExclude, dwFlags); HRESULT hr = m_IMenuPopup->Popup(ppt, prcExclude, dwFlags); - WrapLogExit("CMenuDeskBarWrap::Popup() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::Popup()", hr); return hr; } @@ -182,7 +182,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::OnSelect(DWORD dwSelectType=%08x)\n", this, dwSelectType); HRESULT hr = m_IMenuPopup->OnSelect(dwSelectType); - WrapLogExit("CMenuDeskBarWrap::OnSelect() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::OnSelect()", hr); return hr; } @@ -190,7 +190,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::SetSubMenu(IMenuPopup *pmp=%p, BOOL fSet=%d)\n", this, pmp, fSet); HRESULT hr = m_IMenuPopup->SetSubMenu(pmp, fSet); - WrapLogExit("CMenuDeskBarWrap::SetSubMenu() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::SetSubMenu()", hr); return hr; } @@ -199,8 +199,8 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::GetWindow(HWND *phwnd=%p)\n", this, phwnd); HRESULT hr = m_IOleWindow->GetWindow(phwnd); - if (phwnd) WrapLogMsg("*phwnd=%p\n", *phwnd); - WrapLogExit("CMenuDeskBarWrap::GetWindow() = %08x\n", hr); + if (phwnd) WrapLogPost("*phwnd=%p\n", *phwnd); + WrapLogExit("CMenuDeskBarWrap::GetWindow()", hr); return hr; } @@ -208,7 +208,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::ContextSensitiveHelp(BOOL fEnterMode=%d)\n", this, fEnterMode); HRESULT hr = m_IOleWindow->ContextSensitiveHelp(fEnterMode); - WrapLogExit("CMenuDeskBarWrap::ContextSensitiveHelp() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::ContextSensitiveHelp()", hr); return hr; } @@ -217,7 +217,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::SetSite(IUnknown *pUnkSite=%p)\n", this, pUnkSite); HRESULT hr = m_IObjectWithSite->SetSite(pUnkSite); - WrapLogExit("CMenuDeskBarWrap::SetSite() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::SetSite()", hr); return hr; } @@ -225,8 +225,8 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::GetSite(REFIID riid=%s, PVOID *ppvSite=%p)\n", this, Wrap(riid), ppvSite); HRESULT hr = m_IObjectWithSite->GetSite(riid, ppvSite); - if (ppvSite) WrapLogMsg("*ppvSite=%p\n", *ppvSite); - WrapLogExit("CMenuDeskBarWrap::GetSite() = %08x\n", hr); + if (ppvSite) WrapLogPost("*ppvSite=%p\n", *ppvSite); + WrapLogExit("CMenuDeskBarWrap::GetSite()", hr); return hr; } @@ -235,7 +235,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::SetIconSize(DWORD iIcon=%d)\n", this, iIcon); HRESULT hr = m_IBanneredBar->SetIconSize(iIcon); - WrapLogExit("CMenuDeskBarWrap::SetIconSize() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::SetIconSize()", hr); return hr; } @@ -243,8 +243,8 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::GetIconSize(DWORD* piIcon=%p)\n", this, piIcon); HRESULT hr = m_IBanneredBar->GetIconSize(piIcon); - if (piIcon) WrapLogMsg("*piIcon=%d\n", *piIcon); - WrapLogExit("CMenuDeskBarWrap::GetIconSize() = %08x\n", hr); + if (piIcon) WrapLogPost("*piIcon=%d\n", *piIcon); + WrapLogExit("CMenuDeskBarWrap::GetIconSize()", hr); return hr; } @@ -252,7 +252,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::SetBitmap(HBITMAP hBitmap=%p)\n", this, hBitmap); HRESULT hr = m_IBanneredBar->SetBitmap(hBitmap); - WrapLogExit("CMenuDeskBarWrap::SetBitmap() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::SetBitmap()", hr); return hr; } @@ -260,8 +260,8 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::GetBitmap(HBITMAP* phBitmap=%p)\n", this, phBitmap); HRESULT hr = m_IBanneredBar->GetBitmap(phBitmap); - if (phBitmap) WrapLogMsg("*phBitmap=%p\n", *phBitmap); - WrapLogExit("CMenuDeskBarWrap::GetBitmap() = %08x\n", hr); + if (phBitmap) WrapLogPost("*phBitmap=%p\n", *phBitmap); + WrapLogExit("CMenuDeskBarWrap::GetBitmap()", hr); return hr; } @@ -271,7 +271,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::Initialize()\n", this); HRESULT hr = m_IInitializeObject->Initialize(); - WrapLogExit("CMenuDeskBarWrap::Initialize() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::Initialize()", hr); return hr; } @@ -280,17 +280,17 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::QueryStatus(const GUID *pguidCmdGroup=%p, ULONG cCmds=%u, prgCmds=%p, pCmdText=%p)\n", this, pguidCmdGroup, cCmds, prgCmds, pCmdText); HRESULT hr = m_IOleCommandTarget->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText); - if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); - WrapLogExit("CMenuDeskBarWrap::QueryStatus() = %08x\n", hr); + if (pguidCmdGroup) WrapLogPost("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); + WrapLogExit("CMenuDeskBarWrap::QueryStatus()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) { WrapLogEnter("CMenuDeskBarWrap<%p>::Exec(const GUID *pguidCmdGroup=%p, DWORD nCmdID=%d, DWORD nCmdexecopt=%d, VARIANT *pvaIn=%p, VARIANT *pvaOut=%p)\n", this, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); - if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); + if (pguidCmdGroup) WrapLogPost("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); HRESULT hr = m_IOleCommandTarget->Exec(pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); - WrapLogExit("CMenuDeskBarWrap::Exec() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::Exec()", hr); return hr; } @@ -301,56 +301,56 @@ if (IsEqualIID(guidService, SID_SMenuPopup)) { - WrapLogMsg("SID is SID_SMenuPopup. Using QueryInterface of self instead of wrapped object.\n"); + WrapLogPre("SID is SID_SMenuPopup. Using QueryInterface of self instead of wrapped object.\n"); HRESULT hr = this->QueryInterface(riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); if (SUCCEEDED(hr)) { - WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuDeskBarWrap::QueryService()", hr); return hr; } else { - WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n"); + WrapLogPre("QueryInterface on wrapper failed. Handing over to innter object.\n"); } } else if (IsEqualIID(guidService, SID_SMenuBandParent)) { - WrapLogMsg("SID is SID_SMenuBandParent. Using QueryInterface of self instead of wrapped object.\n"); + WrapLogPre("SID is SID_SMenuBandParent. Using QueryInterface of self instead of wrapped object.\n"); HRESULT hr = this->QueryInterface(riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); if (SUCCEEDED(hr)) { - WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuDeskBarWrap::QueryService()", hr); return hr; } else { - WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n"); + WrapLogPre("QueryInterface on wrapper failed. Handing over to innter object.\n"); } } else if (IsEqualIID(guidService, SID_STopLevelBrowser)) { - WrapLogMsg("SID is SID_STopLevelBrowser. Using QueryInterface of self instead of wrapped object.\n"); + WrapLogPre("SID is SID_STopLevelBrowser. Using QueryInterface of self instead of wrapped object.\n"); HRESULT hr = this->QueryInterface(riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); if (SUCCEEDED(hr)) { - WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuDeskBarWrap::QueryService()", hr); return hr; } else { - WrapLogMsg("QueryInterface on wrapper failed. Handing over to innter object.\n"); + WrapLogPre("QueryInterface on wrapper failed. Handing over to innter object.\n"); } } else { - WrapLogMsg("SID not identified. Calling wrapped object's QueryService.\n"); + WrapLogPre("SID not identified. Calling wrapped object's QueryService.\n"); } HRESULT hr = m_IServiceProvider->QueryService(guidService, riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); - WrapLogExit("CMenuDeskBarWrap::QueryService() = %08x\n", hr); + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuDeskBarWrap::QueryService()", hr); return hr; } @@ -359,7 +359,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::OnFocusChangeIS(LPUNKNOWN lpUnknown=%p, BOOL bFocus=%d)\n", this, lpUnknown, bFocus); HRESULT hr = m_IInputObjectSite->OnFocusChangeIS(lpUnknown, bFocus); - WrapLogExit("CMenuDeskBarWrap::OnFocusChangeIS() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::OnFocusChangeIS()", hr); return hr; } @@ -368,7 +368,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::UIActivateIO(BOOL bActivating=%d, LPMSG lpMsg=%p)\n", this, bActivating, lpMsg); HRESULT hr = m_IInputObject->UIActivateIO(bActivating, lpMsg); - WrapLogExit("CMenuDeskBarWrap::UIActivateIO() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::UIActivateIO()", hr); return hr; } @@ -376,16 +376,16 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::HasFocusIO()\n", this); HRESULT hr = m_IInputObject->HasFocusIO(); - WrapLogExit("CMenuDeskBarWrap::HasFocusIO() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::HasFocusIO()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuDeskBarWrap::TranslateAcceleratorIO(LPMSG lpMsg) { WrapLogEnter("CMenuDeskBarWrap<%p>::TranslateAcceleratorIO(LPMSG lpMsg=%p)\n", this, lpMsg); - if (lpMsg) WrapLogMsg("*lpMsg=%s\n", Wrap(*lpMsg)); + if (lpMsg) WrapLogPre("*lpMsg=%s\n", Wrap(*lpMsg)); HRESULT hr = m_IInputObject->TranslateAcceleratorIO(lpMsg); - WrapLogExit("CMenuDeskBarWrap::TranslateAcceleratorIO() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::TranslateAcceleratorIO()", hr); return hr; } @@ -394,7 +394,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::SetClient(IUnknown *punkClient=%p)\n", this, punkClient); HRESULT hr = m_IDeskBar->SetClient(punkClient); - WrapLogExit("CMenuDeskBarWrap::SetClient() = %08x\n", hr); + WrapLogExit("CMenuDeskBarWrap::SetClient()", hr); CComPtr<IDeskBarClient> dbc; punkClient->QueryInterface(IID_PPV_ARG(IDeskBarClient, &dbc)); @@ -407,8 +407,8 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::GetClient(IUnknown **ppunkClient=%p)\n", this, ppunkClient); HRESULT hr = m_IDeskBar->GetClient(ppunkClient); - if (ppunkClient) WrapLogMsg("*ppunkClient=%p\n", *ppunkClient); - WrapLogExit("CMenuDeskBarWrap::GetClient() = %08x\n", hr); + if (ppunkClient) WrapLogPost("*ppunkClient=%p\n", *ppunkClient); + WrapLogExit("CMenuDeskBarWrap::GetClient()", hr); return hr; } @@ -416,7 +416,7 @@ { WrapLogEnter("CMenuDeskBarWrap<%p>::OnPosRectChangeDB(RECT *prc=%p)\n", this, prc); HRESULT hr = m_IDeskBar->OnPosRectChangeDB(prc); - if (prc) WrapLogMsg("*prc=%s\n", Wrap(*prc)); - WrapLogExit("CMenuDeskBarWrap::OnPosRectChangeDB() = %08x\n", hr); - return hr; -} + if (prc) WrapLogPost("*prc=%s\n", Wrap(*prc)); + WrapLogExit("CMenuDeskBarWrap::OnPosRectChangeDB()", hr); + return hr; +} Modified: branches/shell-experiments/base/shell/rshell/logging/CMenuSiteWrap.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/logging/CMenuSiteWrap.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/logging/CMenuSiteWrap.cpp [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -165,7 +165,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::AddBand(IUnknown * punk=%p)\n", this, punk); HRESULT hr = m_IBandSite->AddBand(punk); - WrapLogExit("CMenuSiteWrap::AddBand() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::AddBand()", hr); return hr; } @@ -173,8 +173,8 @@ { WrapLogEnter("CMenuSiteWrap<%p>::EnumBands(UINT uBand=%u, DWORD* pdwBandID=%p)\n", this, uBand, pdwBandID); HRESULT hr = m_IBandSite->EnumBands(uBand, pdwBandID); - if (pdwBandID) WrapLogMsg("*pdwBandID=%d\n", *pdwBandID); - WrapLogExit("CMenuSiteWrap::EnumBands() = %08x\n", hr); + if (pdwBandID) WrapLogPost("*pdwBandID=%d\n", *pdwBandID); + WrapLogExit("CMenuSiteWrap::EnumBands()", hr); return hr; } @@ -182,9 +182,9 @@ { WrapLogEnter("CMenuSiteWrap<%p>::QueryBand(DWORD dwBandID=%d, IDeskBand **ppstb=%p, DWORD *pdwState=%p, LPWSTR pszName=%p, int cchName=%p)\n", this, dwBandID, ppstb, pdwState, pszName, cchName); HRESULT hr = m_IBandSite->QueryBand(dwBandID, ppstb, pdwState, pszName, cchName); - if (ppstb) WrapLogMsg("*ppstb=%p\n", *ppstb); - if (pdwState) WrapLogMsg("*pdwState=%d\n", *pdwState); - WrapLogExit("CMenuSiteWrap::QueryBand() = %08x\n", hr); + if (ppstb) WrapLogPost("*ppstb=%p\n", *ppstb); + if (pdwState) WrapLogPost("*pdwState=%d\n", *pdwState); + WrapLogExit("CMenuSiteWrap::QueryBand()", hr); return hr; } @@ -192,8 +192,8 @@ { WrapLogEnter("CMenuSiteWrap<%p>::GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv)\n", this, dwBandID, riid, ppv); HRESULT hr = m_IBandSite->GetBandObject(dwBandID, riid, ppv); - if (ppv) WrapLogMsg("*ppv=%p\n", *ppv); - WrapLogExit("CMenuSiteWrap::GetBandObject() = %08x\n", hr); + if (ppv) WrapLogPost("*ppv=%p\n", *ppv); + WrapLogExit("CMenuSiteWrap::GetBandObject()", hr); return hr; } @@ -201,8 +201,8 @@ { WrapLogEnter("CMenuSiteWrap<%p>::GetBandSiteInfo(BANDSITEINFO *pbsinfo=%p)\n", this, pbsinfo); HRESULT hr = m_IBandSite->GetBandSiteInfo(pbsinfo); - if (pbsinfo) WrapLogMsg("*pbsinfo=%p\n", *pbsinfo); - WrapLogExit("CMenuSiteWrap::GetBandSiteInfo() = %08x\n", hr); + if (pbsinfo) WrapLogPost("*pbsinfo=%p\n", *pbsinfo); + WrapLogExit("CMenuSiteWrap::GetBandSiteInfo()", hr); return hr; } @@ -210,16 +210,16 @@ { WrapLogEnter("CMenuSiteWrap<%p>::RemoveBand(DWORD dwBandID=%d)\n", this, dwBandID); HRESULT hr = m_IBandSite->RemoveBand(dwBandID); - WrapLogExit("CMenuSiteWrap::RemoveBand() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::RemoveBand()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuSiteWrap::SetBandSiteInfo(const BANDSITEINFO *pbsinfo) { WrapLogEnter("CMenuSiteWrap<%p>::SetBandSiteInfo(const BANDSITEINFO *pbsinfo=%p)\n", this, pbsinfo); - //if (phwnd) WrapLogMsg("*pbsinfo=%s\n", Wrap(*pbsinfo)); + //if (phwnd) WrapLogPost("*pbsinfo=%s\n", Wrap(*pbsinfo)); HRESULT hr = m_IBandSite->SetBandSiteInfo(pbsinfo); - WrapLogExit("CMenuSiteWrap::SetBandSiteInfo() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::SetBandSiteInfo()", hr); return hr; } @@ -227,7 +227,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::SetBandState(DWORD dwBandID=%d, DWORD dwMask=%08x, DWORD dwState=%d)\n", this, dwBandID, dwMask, dwState); HRESULT hr = m_IBandSite->SetBandState(dwBandID, dwMask, dwState); - WrapLogExit("CMenuSiteWrap::SetBandState() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::SetBandState()", hr); return hr; } @@ -236,8 +236,8 @@ { WrapLogEnter("CMenuSiteWrap<%p>::SetDeskBarSite(IUnknown *punkSite=%p)\n", this, punkSite); HRESULT hr = m_IDeskBarClient->SetDeskBarSite(punkSite); - if (punkSite) WrapLogMsg("*punkSite=%p\n", *punkSite); - WrapLogExit("CMenuSiteWrap::SetDeskBarSite() = %08x\n", hr); + if (punkSite) WrapLogPost("*punkSite=%p\n", *punkSite); + WrapLogExit("CMenuSiteWrap::SetDeskBarSite()", hr); return hr; } @@ -245,7 +245,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::SetModeDBC(DWORD dwMode=%d)\n", this, dwMode); HRESULT hr = m_IDeskBarClient->SetModeDBC(dwMode); - WrapLogExit("CMenuSiteWrap::SetModeDBC() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::SetModeDBC()", hr); return hr; } @@ -253,8 +253,8 @@ { WrapLogEnter("CMenuSiteWrap<%p>::GetSize(DWORD dwWhich=%d, LPRECT prc=%p)\n", this, dwWhich, prc); HRESULT hr = m_IDeskBarClient->GetSize(dwWhich, prc); - if (prc) WrapLogMsg("*prc=%s\n", Wrap(*prc)); - WrapLogExit("CMenuSiteWrap::GetSize() = %08x\n", hr); + if (prc) WrapLogPost("*prc=%s\n", Wrap(*prc)); + WrapLogExit("CMenuSiteWrap::GetSize()", hr); return hr; } @@ -262,7 +262,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::UIActivateDBC(DWORD dwState=%d)\n", this, dwState); HRESULT hr = m_IDeskBarClient->UIActivateDBC(dwState); - WrapLogExit("CMenuSiteWrap::UIActivateDBC() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::UIActivateDBC()", hr); return hr; } @@ -271,8 +271,8 @@ { WrapLogEnter("CMenuSiteWrap<%p>::GetWindow(HWND *phwnd=%p)\n", this, phwnd); HRESULT hr = m_IOleWindow->GetWindow(phwnd); - if (phwnd) WrapLogMsg("*phwnd=%p\n", *phwnd); - WrapLogExit("CMenuSiteWrap::GetWindow() = %08x\n", hr); + if (phwnd) WrapLogPost("*phwnd=%p\n", *phwnd); + WrapLogExit("CMenuSiteWrap::GetWindow()", hr); return hr; } @@ -280,7 +280,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::ContextSensitiveHelp(BOOL fEnterMode=%d)\n", this, fEnterMode); HRESULT hr = m_IOleWindow->ContextSensitiveHelp(fEnterMode); - WrapLogExit("CMenuSiteWrap::ContextSensitiveHelp() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::ContextSensitiveHelp()", hr); return hr; } @@ -289,17 +289,17 @@ { WrapLogEnter("CMenuSiteWrap<%p>::QueryStatus(const GUID *pguidCmdGroup=%p, ULONG cCmds=%u, prgCmds=%p, pCmdText=%p)\n", this, pguidCmdGroup, cCmds, prgCmds, pCmdText); HRESULT hr = m_IOleCommandTarget->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText); - if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); - WrapLogExit("CMenuSiteWrap::QueryStatus() = %08x\n", hr); + if (pguidCmdGroup) WrapLogPost("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); + WrapLogExit("CMenuSiteWrap::QueryStatus()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuSiteWrap::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) { WrapLogEnter("CMenuSiteWrap<%p>::Exec(const GUID *pguidCmdGroup=%p, DWORD nCmdID=%d, DWORD nCmdexecopt=%d, VARIANT *pvaIn=%p, VARIANT *pvaOut=%p)\n", this, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); - if (pguidCmdGroup) WrapLogMsg("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); + if (pguidCmdGroup) WrapLogPre("*pguidCmdGroup=%s\n", Wrap(*pguidCmdGroup)); HRESULT hr = m_IOleCommandTarget->Exec(pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut); - WrapLogExit("CMenuSiteWrap::Exec() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::Exec()", hr); return hr; } @@ -308,7 +308,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::UIActivateIO(BOOL fActivate=%d, LPMSG lpMsg=%p)\n", this, fActivate, lpMsg); HRESULT hr = m_IInputObject->UIActivateIO(fActivate, lpMsg); - WrapLogExit("CMenuSiteWrap::UIActivateIO() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::UIActivateIO()", hr); return hr; } @@ -316,16 +316,16 @@ { WrapLogEnter("CMenuSiteWrap<%p>::HasFocusIO()\n", this); HRESULT hr = m_IInputObject->HasFocusIO(); - WrapLogExit("CMenuSiteWrap::HasFocusIO() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::HasFocusIO()", hr); return hr; } HRESULT STDMETHODCALLTYPE CMenuSiteWrap::TranslateAcceleratorIO(LPMSG lpMsg) { WrapLogEnter("CMenuSiteWrap<%p>::TranslateAcceleratorIO(LPMSG lpMsg=%p)\n", this, lpMsg); - if (lpMsg) WrapLogMsg("*lpMsg=%s\n", Wrap(*lpMsg)); + if (lpMsg) WrapLogPre("*lpMsg=%s\n", Wrap(*lpMsg)); HRESULT hr = m_IInputObject->TranslateAcceleratorIO(lpMsg); - WrapLogExit("CMenuSiteWrap::TranslateAcceleratorIO() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::TranslateAcceleratorIO()", hr); return hr; } @@ -334,7 +334,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::OnFocusChangeIS(LPUNKNOWN lpUnknown=%p, BOOL bFocus=%d)\n", this, lpUnknown, bFocus); HRESULT hr = m_IInputObjectSite->OnFocusChangeIS(lpUnknown, bFocus); - WrapLogExit("CMenuSiteWrap::OnFocusChangeIS() = %08x\n", hr); + WrapLogExit("CMenuSiteWrap::OnFocusChangeIS()", hr); return hr; } @@ -343,7 +343,7 @@ { //WrapLogEnter("CMenuSiteWrap<%p>::OnWinEvent(HWND hWnd=%p, UINT uMsg=%u, WPARAM wParam=%08x, LPARAM lParam=%08x, LRESULT *theResult=%p)\n", this, hWnd, uMsg, wParam, lParam, theResult); HRESULT hr = m_IWinEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult); - //WrapLogExit("CMenuSiteWrap::OnWinEvent() = %08x\n", hr); + //WrapLogExit("CMenuSiteWrap::OnWinEvent()", hr); return hr; } @@ -351,7 +351,7 @@ { //WrapLogEnter("CMenuSiteWrap<%p>::IsWindowOwner(HWND hWnd=%08x)\n", this, hWnd); HRESULT hr = m_IWinEventHandler->IsWindowOwner(hWnd); - //WrapLogExit("CMenuSiteWrap::IsWindowOwner() = %08x\n", hr); + //WrapLogExit("CMenuSiteWrap::IsWindowOwner()", hr); return hr; } @@ -360,7 +360,7 @@ { WrapLogEnter("CMenuSiteWrap<%p>::QueryService(REFGUID guidService=%s, REFIID riid=%s, void **ppvObject=%p)\n", this, Wrap(guidService), Wrap(riid), ppvObject); HRESULT hr = m_IServiceProvider->QueryService(guidService, riid, ppvObject); - if (ppvObject) WrapLogMsg("*ppvObject=%p\n", *ppvObject); - WrapLogExit("CMenuSiteWrap::QueryService() = %08x\n", hr); - return hr; -} + if (ppvObject) WrapLogPost("*ppvObject=%p\n", *ppvObject); + WrapLogExit("CMenuSiteWrap::QueryService()", hr); + return hr; +} Modified: branches/shell-experiments/base/shell/rshell/wraplog.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/wraplog.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/wraplog.cpp [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -30,12 +30,37 @@ } } -void __cdecl WrapLogMsg(_Printf_format_string_ const char* msg, ...) +void __cdecl WrapLogPrint(_Printf_format_string_ const char* msg, ...) { va_list args; for (int i = 0; i < callLevel; i++) fputs(" ", log); - fputs("-- ", log); + va_start(args, msg); + vfprintf(log, msg, args); + va_end(args); + fflush(log); + nTemps = 0; +} + +void __cdecl WrapLogPre(_Printf_format_string_ const char* msg, ...) +{ + va_list args; + for (int i = 0; i < callLevel; i++) + fputs(" ", log); + fputs("pre: ", log); + va_start(args, msg); + vfprintf(log, msg, args); + va_end(args); + fflush(log); + nTemps = 0; +} + +void __cdecl WrapLogPost(_Printf_format_string_ const char* msg, ...) +{ + va_list args; + for (int i = 0; i < callLevel; i++) + fputs(" ", log); + fputs("post: ", log); va_start(args, msg); vfprintf(log, msg, args); va_end(args); @@ -48,7 +73,7 @@ va_list args; for (int i = 0; i < callLevel; i++) fputs(" ", log); - fputs("ENTER >> ", log); + fputs("CALL ", log); va_start(args, msg); vfprintf(log, msg, args); va_end(args); @@ -57,18 +82,25 @@ nTemps = 0; } -void __cdecl WrapLogExit(_Printf_format_string_ const char* msg, ...) +void __cdecl WrapLogExit(const char* msg, HRESULT code) { - va_list args; + //if (FAILED(code)) + // WrapLogPrint("RETURN %s = %08x\n", msg, code); + //else if (code == S_OK) + // WrapLogPrint("RETURN %s = S_OK\n", msg); + //else if (code == S_FALSE) + // WrapLogPrint("RETURN %s = S_FALSE\n", msg); + //else + // WrapLogPrint("RETURN %s = %d\n", msg, code); + if (FAILED(code)) + WrapLogPrint("RETURN %08x\n", code); + else if (code == S_OK) + WrapLogPrint("RETURN S_OK\n"); + else if (code == S_FALSE) + WrapLogPrint("RETURN S_FALSE\n"); + else + WrapLogPrint("RETURN %d\n", code); callLevel--; - for (int i = 0; i < callLevel; i++) - fputs(" ", log); - fputs("EXIT <<< ", log); - va_start(args, msg); - vfprintf(log, msg, args); - va_end(args); - fflush(log); - nTemps = 0; } template <class T> Modified: branches/shell-experiments/base/shell/rshell/wraplog.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/wraplog.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/wraplog.h [iso-8859-1] Thu Feb 20 12:12:42 2014 @@ -2,9 +2,10 @@ void WrapLogOpen(); void WrapLogClose(); -void __cdecl WrapLogMsg(_Printf_format_string_ const char* msg, ...); +void __cdecl WrapLogPre(_Printf_format_string_ const char* msg, ...); +void __cdecl WrapLogPost(_Printf_format_string_ const char* msg, ...); void __cdecl WrapLogEnter(_Printf_format_string_ const char* msg, ...); -void __cdecl WrapLogExit(_Printf_format_string_ const char* msg, ...); +void __cdecl WrapLogExit(const char* msg, HRESULT code); template <class T> LPSTR Wrap(const T& value);
10 years, 10 months
1
0
0
0
[akhaldi] 62261: [GETUNAME][TAPIUI] * Add Albanian translation. By Ardit Dani, corrected by me. CORE-7924 #resolve #comment Committed in r62261. Thanks !
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Feb 20 11:05:27 2014 New Revision: 62261 URL:
http://svn.reactos.org/svn/reactos?rev=62261&view=rev
Log: [GETUNAME][TAPIUI] * Add Albanian translation. By Ardit Dani, corrected by me. CORE-7924 #resolve #comment Committed in r62261. Thanks ! Added: trunk/reactos/dll/win32/getuname/lang/sq-AL.rc (with props) trunk/reactos/dll/win32/tapiui/lang/sq-AL.rc (with props) Modified: trunk/reactos/dll/win32/getuname/getuname.rc trunk/reactos/dll/win32/tapiui/tapiui.rc [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/getuname/getuname.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/getuname/getunam…
Added: trunk/reactos/dll/win32/getuname/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/getuname/lang/sq…
Added: trunk/reactos/dll/win32/tapiui/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/tapiui/lang/sq-A…
Modified: trunk/reactos/dll/win32/tapiui/tapiui.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/tapiui/tapiui.rc…
10 years, 10 months
1
0
0
0
[cwittich] 62260: [kernel32] sync TIME_CompTimeZoneID with wine 1.7.11
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Feb 19 21:01:25 2014 New Revision: 62260 URL:
http://svn.reactos.org/svn/reactos?rev=62260&view=rev
Log: [kernel32] sync TIME_CompTimeZoneID with wine 1.7.11 Modified: trunk/reactos/dll/win32/kernel32/wine/timezone.c Modified: trunk/reactos/dll/win32/kernel32/wine/timezone.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/wine/ti…
============================================================================== --- trunk/reactos/dll/win32/kernel32/wine/timezone.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/wine/timezone.c [iso-8859-1] Wed Feb 19 21:01:25 2014 @@ -120,7 +120,7 @@ DWORD TIME_CompTimeZoneID( const TIME_ZONE_INFORMATION *pTZinfo, FILETIME *lpFileTime, BOOL islocal ) { - int ret; + int ret, year; BOOL beforeStandardDate, afterDaylightDate; DWORD retval = TIME_ZONE_ID_INVALID; LONGLONG llTime = 0; /* initialized to prevent gcc complaining */ @@ -145,20 +145,29 @@ if (!islocal) { FILETIME2LL( lpFileTime, llTime ); - llTime -= ( pTZinfo->Bias + pTZinfo->DaylightBias ) - * (LONGLONG)TICKSPERMIN; + llTime -= pTZinfo->Bias * (LONGLONG)TICKSPERMIN; LL2FILETIME( llTime, &ftTemp) lpFileTime = &ftTemp; } FileTimeToSystemTime(lpFileTime, &SysTime); + year = SysTime.wYear; + + if (!islocal) { + llTime -= pTZinfo->DaylightBias * (LONGLONG)TICKSPERMIN; + LL2FILETIME( llTime, &ftTemp) + FileTimeToSystemTime(lpFileTime, &SysTime); + } - /* check for daylight savings */ - ret = TIME_DayLightCompareDate( &SysTime, &pTZinfo->StandardDate); - if (ret == -2) - return TIME_ZONE_ID_INVALID; - - beforeStandardDate = ret < 0; + /* check for daylight savings */ + if(year == SysTime.wYear) { + ret = TIME_DayLightCompareDate( &SysTime, &pTZinfo->StandardDate); + if (ret == -2) + return TIME_ZONE_ID_INVALID; + + beforeStandardDate = ret < 0; + } else + beforeStandardDate = SysTime.wYear < year; if (!islocal) { llTime -= ( pTZinfo->StandardBias - pTZinfo->DaylightBias ) @@ -167,11 +176,14 @@ FileTimeToSystemTime(lpFileTime, &SysTime); } - ret = TIME_DayLightCompareDate( &SysTime, &pTZinfo->DaylightDate); - if (ret == -2) - return TIME_ZONE_ID_INVALID; - - afterDaylightDate = ret >= 0; + if(year == SysTime.wYear) { + ret = TIME_DayLightCompareDate( &SysTime, &pTZinfo->DaylightDate); + if (ret == -2) + return TIME_ZONE_ID_INVALID; + + afterDaylightDate = ret >= 0; + } else + afterDaylightDate = SysTime.wYear > year; retval = TIME_ZONE_ID_STANDARD; if( pTZinfo->DaylightDate.wMonth < pTZinfo->StandardDate.wMonth ) {
10 years, 10 months
1
0
0
0
[dquintana] 62259: [RSHELL] * CMenuDeskBar: Use the submenu pointer to pass on the cancel events. Windows appears to call this with code=2 (cancellevel). * CMenuBand: Begin implementing a focus man...
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Feb 19 20:35:50 2014 New Revision: 62259 URL:
http://svn.reactos.org/svn/reactos?rev=62259&view=rev
Log: [RSHELL] * CMenuDeskBar: Use the submenu pointer to pass on the cancel events. Windows appears to call this with code=2 (cancellevel). * CMenuBand: Begin implementing a focus manager for the menu windows. This class will take care of handling mouse and keyboard interactions, including closing the start menu and submenus when the user clicks outside the menu window. CORE-7881 Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp branches/shell-experiments/base/shell/rshell/precomp.h Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Wed Feb 19 20:35:50 2014 @@ -31,6 +31,7 @@ extern "C" BOOL WINAPI Shell_GetImageLists(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList); class CMenuBand; +class CMenuFocusManager; class CMenuToolbarBase { @@ -149,6 +150,8 @@ BOOL m_useBigIcons; HWND m_topLevelWindow; + + CMenuFocusManager * m_focusManager; public: @@ -237,6 +240,7 @@ HRESULT CallCBWithId(UINT Id, UINT uMsg, WPARAM wParam, LPARAM lParam); HRESULT CallCBWithPidl(LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam); HRESULT TrackPopup(HMENU popup, INT x, INT y); + HRESULT GetTopLevelWindow(HWND*topLevel); BOOL UseBigIcons() { return m_useBigIcons; @@ -268,6 +272,261 @@ HRESULT _CallCB(UINT uMsg, WPARAM wParam, LPARAM lParam, UINT id = 0, LPITEMIDLIST pidl = NULL); }; +class CMenuFocusManager : + public CComCoClass<CMenuFocusManager>, + public CComObjectRootEx<CComMultiThreadModelNoCS> +{ +private: + static DWORD TlsIndex; + + static CMenuFocusManager * GetManager() + { + return reinterpret_cast<CMenuFocusManager *>(TlsGetValue(TlsIndex)); + } + +public: + static CMenuFocusManager * AcquireManager() + { + CMenuFocusManager * obj = NULL; + + if (!TlsIndex) + { + if ((TlsIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES) + return NULL; + } + + obj = GetManager(); + + if (!obj) + { + obj = new CComObject<CMenuFocusManager>(); + TlsSetValue(TlsIndex, obj); + } + + obj->AddRef(); + + return obj; + } + + static void ReleaseManager(CMenuFocusManager * obj) + { + if (!obj->Release()) + { + TlsSetValue(TlsIndex, NULL); + } + } + +private: + static LRESULT CALLBACK s_GetMsgHook(INT nCode, WPARAM wParam, LPARAM lParam) + { + return GetManager()->GetMsgHook(nCode, wParam, lParam); + } + +private: + // TODO: make dynamic +#define MAX_RECURSE 100 + CMenuBand* m_bandStack[MAX_RECURSE]; + int m_bandCount; + + HRESULT PushToArray(CMenuBand * item) + { + if (m_bandCount >= MAX_RECURSE) + return E_OUTOFMEMORY; + + m_bandStack[m_bandCount++] = item; + return S_OK; + } + + HRESULT PopFromArray(CMenuBand ** pItem) + { + if (pItem) + *pItem = NULL; + + if (m_bandCount <= 0) + return E_FAIL; + + m_bandCount--; + + if (pItem) + *pItem = m_bandStack[m_bandCount]; + + return S_OK; + } + + HRESULT PeekArray(CMenuBand ** pItem) + { + if (!pItem) + return E_FAIL; + + *pItem = NULL; + + if (m_bandCount <= 0) + return E_FAIL; + + *pItem = m_bandStack[m_bandCount - 1]; + + return S_OK; + } + +protected: + CMenuFocusManager() : + m_currentBand(NULL), + m_currentFocus(NULL), + m_bandCount(0) + { + m_threadId = GetCurrentThreadId(); + } + + ~CMenuFocusManager() + { + } + +public: + + DECLARE_NOT_AGGREGATABLE(CMenuFocusManager) + DECLARE_PROTECT_FINAL_CONSTRUCT() + BEGIN_COM_MAP(CMenuFocusManager) + END_COM_MAP() + +private: + CMenuBand * m_currentBand; + HWND m_currentFocus; + HHOOK m_hHook; + DWORD m_threadId; + + LRESULT GetMsgHook(INT nCode, WPARAM wParam, LPARAM lParam) + { + if (nCode < 0) + return CallNextHookEx(m_hHook, nCode, wParam, lParam); + + BOOL callNext = TRUE; + BOOL fRemoved = wParam; + MSG* msg = reinterpret_cast<MSG*>(lParam); + + if (nCode == HC_ACTION) + { + // Do whatever is necessary here + + switch (msg->message) + { + case WM_CLOSE: + break; + case WM_SYSKEYDOWN: + case WM_KEYDOWN: + switch (msg->wParam) + { + case VK_MENU: + case VK_LMENU: + case VK_RMENU: + m_currentBand->OnSelect(MPOS_FULLCANCEL); + break; + case VK_LEFT: + m_currentBand->OnSelect(MPOS_SELECTLEFT); + break; + case VK_RIGHT: + m_currentBand->OnSelect(MPOS_SELECTRIGHT); + break; + case VK_UP: + //m_currentBand->ChildTrack(VK_UP); + break; + case VK_DOWN: + //m_currentBand->ChildTrack(VK_DOWN); + break; + } + break; + case WM_CHAR: + //if (msg->wParam >= 'a' && msg->wParam <= 'z') + //{ + // callNext = FALSE; + // PostMessage(m_currentFocus, WM_SYSCHAR, wParam, lParam); + //} + break; + case WM_ACTIVATE: + break; + + } + + if (!callNext) + return 0; + } + + return CallNextHookEx(m_hHook, nCode, wParam, lParam); + } + + HRESULT PlaceHooks(HWND window) + { + //SetCapture(window); + m_hHook = SetWindowsHookEx(WH_GETMESSAGE, s_GetMsgHook, NULL, m_threadId); + return S_OK; + } + + HRESULT RemoveHooks(HWND window) + { + UnhookWindowsHookEx(m_hHook); + //ReleaseCapture(); + return S_OK; + } + + HRESULT UpdateFocus(CMenuBand * newBand) + { + HRESULT hr; + + hr = RemoveHooks(m_currentFocus); + + if (FAILED(hr) || !newBand) + { + m_currentFocus = NULL; + m_currentBand = NULL; + return S_OK; + } + + HWND newFocus; + hr = newBand->GetTopLevelWindow(&newFocus); + if (FAILED(hr)) + return hr; + + hr = PlaceHooks(m_currentFocus); + if (FAILED(hr)) + return hr; + + m_currentFocus = newFocus; + m_currentBand = newBand; + + return S_OK; + } + +public: + HRESULT PushMenu(CMenuBand * mb) + { + HRESULT hr; + + hr = PushToArray(mb); + if (FAILED(hr)) + return hr; + + return UpdateFocus(mb); + } + + HRESULT PopMenu(CMenuBand * mb) + { + CMenuBand * mbc; + HRESULT hr; + + hr = PopFromArray(&mbc); + if (FAILED(hr)) + return hr; + + if (mb != mbc) + return E_FAIL; + + hr = PeekArray(&mbc); + + return UpdateFocus(mbc); + } +}; + +DWORD CMenuFocusManager::TlsIndex = 0; + extern "C" HRESULT CMenuBand_Constructor(REFIID riid, LPVOID *ppv) { @@ -930,10 +1189,13 @@ m_SFToolbar(NULL), m_useBigIcons(FALSE) { + m_focusManager = CMenuFocusManager::AcquireManager(); } CMenuBand::~CMenuBand() { + CMenuFocusManager::ReleaseManager(m_focusManager); + if (m_site) m_site->Release(); @@ -1258,9 +1520,18 @@ return hr; if (fShow) - return _CallCB(SMC_INITMENU, 0, 0); - - return S_OK; + { + hr = _CallCB(SMC_INITMENU, 0, 0); + if (FAILED(hr)) + return hr; + } + + if (fShow) + hr = m_focusManager->PushMenu(this); + else + hr = m_focusManager->PopMenu(this); + + return hr; } HRESULT STDMETHODCALLTYPE CMenuBand::CloseDW(DWORD dwReserved) @@ -1722,3 +1993,9 @@ ::TrackPopupMenu(popup, 0, x, y, 0, m_menuOwner, NULL); return S_OK; } + +HRESULT CMenuBand::GetTopLevelWindow(HWND*topLevel) +{ + *topLevel = m_topLevelWindow; + return S_OK; +} Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] Wed Feb 19 20:35:50 2014 @@ -576,14 +576,11 @@ UIActivateIO(FALSE, NULL); } - //if (bubbleUp && m_Site) - //{ - // CComPtr<IMenuPopup> pmp; - // HRESULT hr = IUnknown_QueryService(m_Site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &pmp)); - // if (FAILED(hr)) - // return hr; - // pmp->OnSelect(dwSelectType); - //} + if (bubbleUp && m_SubMenuParent) + { + hr = m_SubMenuParent->OnSelect(MPOS_CANCELLEVEL); // why?? + return hr; + } return S_OK; } Modified: branches/shell-experiments/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] Wed Feb 19 20:35:50 2014 @@ -3,9 +3,9 @@ #define USE_SYSTEM_MENUSITE 0 #define USE_SYSTEM_MENUBAND 0 -#define WRAP_MENUDESKBAR 1 -#define WRAP_MENUSITE 1 -#define WRAP_MENUBAND 1 +#define WRAP_MENUDESKBAR 0 +#define WRAP_MENUSITE 0 +#define WRAP_MENUBAND 0 #include <stdio.h> #include <tchar.h>
10 years, 10 months
1
0
0
0
[hbelusca] 62258: [FAST486] - When pushing 16-bit value, check only low word of ESP (i.e. SP). - Don't forget to clear high word of EIP, for the Jump instruction of group 4 (0xFF).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Feb 19 20:24:53 2014 New Revision: 62258 URL:
http://svn.reactos.org/svn/reactos?rev=62258&view=rev
Log: [FAST486] - When pushing 16-bit value, check only low word of ESP (i.e. SP). - Don't forget to clear high word of EIP, for the Jump instruction of group 4 (0xFF). Modified: branches/ntvdm/lib/fast486/common.inl branches/ntvdm/lib/fast486/opgroups.c Modified: branches/ntvdm/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Feb 19 20:24:53 2014 @@ -296,7 +296,7 @@ USHORT ShortValue = LOWORD(Value); /* Check if SP is 1 */ - if (State->GeneralRegs[FAST486_REG_ESP].Long == 1) + if (State->GeneralRegs[FAST486_REG_ESP].LowWord == 1) { Fast486Exception(State, FAST486_EXCEPTION_SS); return FALSE; Modified: branches/ntvdm/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Wed Feb 19 20:24:53 2014 @@ -1632,6 +1632,9 @@ { /* Set the IP to the address */ State->InstPtr.LowWord = Value; + + /* Clear the top half of EIP */ + State->InstPtr.Long &= 0xFFFF; } else if (ModRegRm.Register == 5) {
10 years, 10 months
1
0
0
0
[cwittich] 62257: [kernel32] fix crash in kernel32_winetest volume
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Feb 19 19:44:05 2014 New Revision: 62257 URL:
http://svn.reactos.org/svn/reactos?rev=62257&view=rev
Log: [kernel32] fix crash in kernel32_winetest volume Modified: trunk/reactos/dll/win32/kernel32/client/file/volume.c Modified: trunk/reactos/dll/win32/kernel32/client/file/volume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/file/volume.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/file/volume.c [iso-8859-1] Wed Feb 19 19:44:05 2014 @@ -552,6 +552,12 @@ DWORD ErrorCode; BOOL Result = FALSE; + if (!lpszFileName || !lpszVolumePathName || !cchBufferLength) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!(PathLength = GetFullPathNameW(lpszFileName, 0, NULL, NULL))) { return Result;
10 years, 10 months
1
0
0
0
[hbelusca] 62256: [FAST486]: Hardcoded_values--;
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Feb 19 19:27:05 2014 New Revision: 62256 URL:
http://svn.reactos.org/svn/reactos?rev=62256&view=rev
Log: [FAST486]: Hardcoded_values--; Modified: branches/ntvdm/lib/fast486/common.inl Modified: branches/ntvdm/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Wed Feb 19 19:27:05 2014 @@ -281,7 +281,7 @@ } /* Subtract ESP by 4 */ - State->GeneralRegs[FAST486_REG_ESP].Long -= 4; + State->GeneralRegs[FAST486_REG_ESP].Long -= sizeof(ULONG); /* Store the value in SS:ESP */ return Fast486WriteMemory(State, @@ -303,7 +303,7 @@ } /* Subtract SP by 2 */ - State->GeneralRegs[FAST486_REG_ESP].LowWord -= 2; + State->GeneralRegs[FAST486_REG_ESP].LowWord -= sizeof(USHORT); /* Store the value in SS:SP */ return Fast486WriteMemory(State, @@ -319,8 +319,6 @@ Fast486StackPop(PFAST486_STATE State, PULONG Value) { - ULONG LongValue; - USHORT ShortValue; BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size; /* The OPSIZE prefix toggles the size */ @@ -329,6 +327,7 @@ if (Size) { /* 32-bit size */ + ULONG LongValue; /* Check if ESP is 0xFFFFFFFF */ if (State->GeneralRegs[FAST486_REG_ESP].Long == 0xFFFFFFFF) @@ -350,7 +349,7 @@ } /* Increment ESP by 4 */ - State->GeneralRegs[FAST486_REG_ESP].Long += 4; + State->GeneralRegs[FAST486_REG_ESP].Long += sizeof(ULONG); /* Store the value in the result */ *Value = LongValue; @@ -358,6 +357,7 @@ else { /* 16-bit size */ + USHORT ShortValue; /* Check if SP is 0xFFFF */ if (State->GeneralRegs[FAST486_REG_ESP].LowWord == 0xFFFF) @@ -379,7 +379,7 @@ } /* Increment SP by 2 */ - State->GeneralRegs[FAST486_REG_ESP].LowWord += 2; + State->GeneralRegs[FAST486_REG_ESP].LowWord += sizeof(USHORT); /* Store the value in the result */ *Value = ShortValue;
10 years, 10 months
1
0
0
0
[hbelusca] 62255: [FAST486]: Fix argument type.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Feb 19 19:23:36 2014 New Revision: 62255 URL:
http://svn.reactos.org/svn/reactos?rev=62255&view=rev
Log: [FAST486]: Fix argument type. Modified: branches/ntvdm/lib/fast486/fast486.c Modified: branches/ntvdm/lib/fast486/fast486.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/fast486.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/fast486.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/fast486.c [iso-8859-1] Wed Feb 19 19:23:36 2014 @@ -46,7 +46,7 @@ inline VOID NTAPI -Fast486ExecutionControl(PFAST486_STATE State, INT Command) +Fast486ExecutionControl(PFAST486_STATE State, FAST486_EXEC_CMD Command) { UCHAR Opcode; INT ProcedureCallCount = 0;
10 years, 10 months
1
0
0
0
[dquintana] 62254: [RSHELL] * Reduce a few more log differences with windows. CORE-7586
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Feb 19 13:58:28 2014 New Revision: 62254 URL:
http://svn.reactos.org/svn/reactos?rev=62254&view=rev
Log: [RSHELL] * Reduce a few more log differences with windows. CORE-7586 Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp branches/shell-experiments/base/shell/rshell/precomp.h Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Wed Feb 19 13:58:28 2014 @@ -1289,8 +1289,28 @@ HRESULT STDMETHODCALLTYPE CMenuBand::UIActivateIO(BOOL fActivate, LPMSG lpMsg) { - UNIMPLEMENTED; - return S_OK; + HRESULT hr; + + CComPtr<IMenuPopup> pmp; + + hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &pmp)); + if (FAILED(hr)) + return hr; + + hr = pmp->SetSubMenu(this, TRUE); + if (FAILED(hr)) + return hr; + + CComPtr<IOleWindow> pTopLevelWindow; + hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IOleWindow, &pTopLevelWindow)); + if (FAILED(hr)) + return hr; + + hr = pTopLevelWindow->GetWindow(&m_topLevelWindow); + if (FAILED(hr)) + return hr; + + return S_FALSE; } HRESULT STDMETHODCALLTYPE CMenuBand::HasFocusIO() Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp [iso-8859-1] Wed Feb 19 13:58:28 2014 @@ -23,6 +23,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(CMenuDeskBar); +const static GUID CGID_MenuDeskBar = { 0x5C9F0A12, 0x959E, 0x11D0, { 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x08, 0x26, 0x36 } }; + typedef CWinTraits< WS_POPUP | WS_DLGFRAME | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | WS_EX_PALETTEWINDOW @@ -193,6 +195,18 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) { + if (IsEqualIID(*pguidCmdGroup, CGID_MenuDeskBar)) + { + switch (nCmdID) + { + case 2: // refresh + return S_OK; + case 3: // load complete + return S_OK; + case 4: // set font metrics + return S_OK; + } + } if (IsEqualIID(*pguidCmdGroup, CGID_Explorer)) { } Modified: branches/shell-experiments/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] Wed Feb 19 13:58:28 2014 @@ -1,5 +1,5 @@ -#define USE_SYSTEM_MENUDESKBAR 1 +#define USE_SYSTEM_MENUDESKBAR 0 #define USE_SYSTEM_MENUSITE 0 #define USE_SYSTEM_MENUBAND 0
10 years, 10 months
1
0
0
0
[dquintana] 62253: [RSHELL] * Improve the logging system to allow using the same logger for both windows classes and rshell classes. * Add a wrapper for CMenuSite. * CMenuDeskBar: Reduce the log di...
by dquintana@svn.reactos.org
Author: dquintana Date: Wed Feb 19 12:19:50 2014 New Revision: 62253 URL:
http://svn.reactos.org/svn/reactos?rev=62253&view=rev
Log: [RSHELL] * Improve the logging system to allow using the same logger for both windows classes and rshell classes. * Add a wrapper for CMenuSite. * CMenuDeskBar: Reduce the log differences by keeping a cached copy of the client HWND. * CMenuBand: Reduce the log differences by keeping a copy of the top level HWND. Will be used later. CORE-7586 Added: branches/shell-experiments/base/shell/rshell/logging/CMenuSiteWrap.cpp (with props) Modified: branches/shell-experiments/base/shell/rshell/CMakeLists.txt branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp branches/shell-experiments/base/shell/rshell/CStartMenu.cpp branches/shell-experiments/base/shell/rshell/logging/CMenuBandWrap.cpp (contents, props changed) branches/shell-experiments/base/shell/rshell/logging/CMenuDeskBarWrap.cpp (contents, props changed) branches/shell-experiments/base/shell/rshell/precomp.h branches/shell-experiments/base/shell/rshell/wraplog.cpp [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/shell-experiments/base/shell/rshell/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/logging/CMenuBandWrap.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/logging/CMenuDeskBarWrap.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Added: branches/shell-experiments/base/shell/rshell/logging/CMenuSiteWrap.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
Modified: branches/shell-experiments/base/shell/rshell/wraplog.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
10 years, 10 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
47
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200