* Give TrackPopupMenuEx the top-level window. Need to figure out how Windows does this, it probably does not simply use the top-level window that way.
* Give TrackPopupMenuEx better flags and a better exclude rect.
CORE-7586

svn path=/branches/shell-experiments/; revision=62469
This commit is contained in:
David Quintana 2014-03-10 12:01:37 +00:00
parent 2b06cdd40e
commit 6f06c27374
3 changed files with 18 additions and 12 deletions

View file

@ -549,17 +549,17 @@ HRESULT CMenuToolbarBase::PopupSubMenu(UINT uItem, UINT index, HMENU menu)
if (!SendMessage(m_hwndToolbar, TB_GETITEMRECT, index, reinterpret_cast<LPARAM>(&rc)))
return E_FAIL;
GetWindowRect(m_hwnd, &rcx);
GetClientRect(m_hwndToolbar, &rcx);
POINT a = { rc.left, rc.top };
POINT b = { rc.right, rc.bottom };
POINT c = { rcx.left, rcx.top };
POINT d = { rcx.right, rcx.bottom };
POINT c = { rc.left, rc.top };
POINT d = { rc.right, rc.bottom };
ClientToScreen(m_hwndToolbar, &a);
ClientToScreen(m_hwndToolbar, &b);
ClientToScreen(m_hwnd, &c);
ClientToScreen(m_hwnd, &d);
ClientToScreen(m_hwndToolbar, &c);
ClientToScreen(m_hwndToolbar, &d);
POINT pt = { a.x, b.y };
RECT rcl = { c.x, c.y, d.x, d.y };