Windows API Calls for Powerbuilder 5.0

¹®Á¦

DeleteMenu( )

ÇØ°á

The DeleteMenu function deletes an item from the specified menu. If the menu item opens a menu or submenu, this function destroys the handle to the menu or submenu and frees the memory used by the menu or submenu.

Global External Function:
FUNCTION boolean DeleteMenu(ulong mhand, uint upos, uint flag) LIBRARY "user32.dll"

Script:
ulong m_handle
boolean rtn
m_handle = GetSystemMenu(handle(w_main), false) // Need to get the handle of the system
                                                                        // menu first.
rtn = DeleteMenu(m_handle, 1, 0) // The second argument, the 1 refers to the position in the
                                                // menu.
Messagebox("Return Code", string(m_handle))
Messagebox("Return Code", string(rtn))

 

ÂüÁ¶