[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 TrackPopupMenu( hmenu, nFlags, nX, nY, nReserve, hwnd )-> <lSuccess>
------------------------------------------------------------------------------


 PARAMETER:

  <hMenu>    Handle that identifies the pop-up menu to be displayed.
             The application retrieves this handle by calling the
             CreatePopupMenu function to create a new pop-up menu
             or by calling the GetSubMenu function to retrieve the
             handle of a pop-up menu associated with an existing menu item

  <nFlags>   specifies the screen-position and mouse-button flags.
             The screen-position flag can be one of the following: 

              TPM_CENTERALIGN Centers the pop-up menu horizontally relative
                          [4] to the coordinate specified by the x parameter
              TPM_LEFTALIGN   Positions the pop-up menu so that its left
                          [0] side is aligned with the coordinate specified
                              by the x parameter. 
              TPM_RIGHTALIGN  Positions the pop-up menu so that its right
                          [8] side is aligned with the coordinate specified
                              by the x parameter. 

             The mouse-button flag can be one of the following: 

              TPM_LEFTBUTTON  Causes the pop-up menu to track the left mouse
                          [0] button. 
              TPM_RIGHTBUTTON Causes the pop-up menu to track the right
                          [2] mouse button instead of the left. 


  <nX>       specifies the horizontal position, in screen coordinates,
             of the pop-up menu. Depending on the value of the nFlags 
             parameter, the menu can be left-aligned, right-aligned or
             centered relative to this position. 

  <nY>       specifies the vertical position, in screen coordinates,
             of the top of the menu on the screen. 


  <nReserve> Reserved, must be zero

  <hWnd>     handle that identifies the window that owns the pop-up menu.
             This window receives all WM_COMMAND messages from the menu, but
             not until TrackPopupMenu returns. 


 RETURNS:

  <lSuccess> is TRUE if the function is successful


 DESCRIPTION:

  The TrackPopupMenu function displays the given floating pop-up menu at
  the specified location and tracks the selection of items on that pop-up
  menu. A floating pop-up menu can appear anywhere on the screen. 


 SOURCE:  

  SOURCE\WINAPI\MENUS.C



See Also: CreatePopupMenu GetSubMenu
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson