mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:23:34 +00:00
[RSHELL]
* 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:
parent
2b06cdd40e
commit
6f06c27374
3 changed files with 18 additions and 12 deletions
|
@ -622,18 +622,22 @@ HRESULT CMenuBand::_TrackSubMenuUsingTrackPopupMenu(HMENU popup, INT x, INT y, R
|
|||
{
|
||||
HWND sendTo = m_menuOwner;
|
||||
|
||||
// FIXME: use?
|
||||
//TPMPARAMS params = { sizeof(TPMPARAMS), rcExclude };
|
||||
TPMPARAMS params = { sizeof(TPMPARAMS), rcExclude };
|
||||
|
||||
UINT flags = TPM_VERPOSANIMATION | TPM_VERTICAL | TPM_LEFTALIGN;
|
||||
|
||||
if (sendTo)
|
||||
{
|
||||
::TrackPopupMenuEx(popup, 0, x, y, sendTo, NULL); // ¶ms);
|
||||
::TrackPopupMenuEx(popup, flags, x, y, sendTo, ¶ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIXME: Windows uses the top-level window when calling TrackPopupMenuEx,
|
||||
// but this is probably not the means by which it obtains that HWND.
|
||||
// Meanwhile, this works.
|
||||
GetWindow(&sendTo);
|
||||
::TrackPopupMenuEx(popup, TPM_RETURNCMD, x, y, sendTo, NULL); // ¶ms);
|
||||
// TODO: use the result somehow
|
||||
sendTo = GetAncestor(sendTo, GA_ROOT);
|
||||
::TrackPopupMenuEx(popup, flags, x, y, sendTo, ¶ms);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue