mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Implement TrackPopupMenu. This fixes bug #131
svn path=/trunk/; revision=8716
This commit is contained in:
parent
e8f56accc6
commit
c72fe4771e
1 changed files with 31 additions and 22 deletions
|
@ -21,7 +21,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: menu.c,v 1.54 2004/03/10 20:36:19 silverblade Exp $
|
||||
/* $Id: menu.c,v 1.55 2004/03/14 16:39:49 gvg Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/menu.c
|
||||
|
@ -4200,41 +4200,50 @@ SetSystemMenu (
|
|||
BOOL
|
||||
STDCALL
|
||||
TrackPopupMenu(
|
||||
HMENU hMenu,
|
||||
UINT uFlags,
|
||||
HMENU Menu,
|
||||
UINT Flags,
|
||||
int x,
|
||||
int y,
|
||||
int nReserved,
|
||||
HWND hWnd,
|
||||
CONST RECT *prcRect)
|
||||
int Reserved,
|
||||
HWND Wnd,
|
||||
CONST RECT *Rect)
|
||||
{
|
||||
TPMPARAMS tpm;
|
||||
BOOL ret = FALSE;
|
||||
|
||||
if(prcRect)
|
||||
MenuInitTracking(Wnd, Menu, TRUE, Flags);
|
||||
|
||||
/* Send WM_INITMENUPOPUP message only if TPM_NONOTIFY flag is not specified */
|
||||
if (0 == (Flags & TPM_NONOTIFY))
|
||||
{
|
||||
tpm.cbSize = sizeof(TPMPARAMS);
|
||||
tpm.rcExclude = *prcRect;
|
||||
SendMessageW(Wnd, WM_INITMENUPOPUP, (WPARAM) Menu, 0);
|
||||
}
|
||||
|
||||
return (BOOL)NtUserTrackPopupMenuEx(hMenu, uFlags, x, y, hWnd,
|
||||
(prcRect ? &tpm : NULL));
|
||||
if (MenuShowPopup(Wnd, Menu, 0, x, y, 0, 0 ))
|
||||
{
|
||||
ret = MenuTrackMenu(Menu, Flags | TPM_POPUPMENU, 0, 0, Wnd, Rect);
|
||||
}
|
||||
MenuExitTracking(Wnd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL
|
||||
STDCALL
|
||||
TrackPopupMenuEx(
|
||||
HMENU hmenu,
|
||||
UINT fuFlags,
|
||||
HMENU Menu,
|
||||
UINT Flags,
|
||||
int x,
|
||||
int y,
|
||||
HWND hwnd,
|
||||
LPTPMPARAMS lptpm)
|
||||
HWND Wnd,
|
||||
LPTPMPARAMS Tpm)
|
||||
{
|
||||
return (BOOL)NtUserTrackPopupMenuEx(hmenu, fuFlags, x, y, hwnd, lptpm);
|
||||
/* Not fully implemented */
|
||||
return TrackPopupMenu(Menu, Flags, x, y, 0, Wnd,
|
||||
NULL != Tpm ? &Tpm->rcExclude : NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue