Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.32 KB

File metadata and controls

48 lines (31 loc) · 1.32 KB

Home

Function name : CreatePopupMenu

Group: Menu - Library: user32


The CreatePopupMenu function creates a drop-down menu, submenu, or shortcut menu.

The menu is initially empty. You can insert or append menu items by using the InsertMenuItem function. You can also use the InsertMenu function to insert menu items and the AppendMenu function to append menu items.


Code examples:

Attaching menu to a top-level form
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Shortcut Menu Class
Adding user-defined items to the Control Menu of VFP form (requires VFP9)

Declaration:

HMENU CreatePopupMenu(VOID);  

FoxPro declaration:

DECLARE INTEGER CreatePopupMenu IN user32  

Parameters:

This function has no parameters.


Return value:

If the function succeeds, the return value is a handle to the newly created menu. If the function fails, the return value is NULL.


Comments:

Call the DestroyMenu function to free the resource.