Files
uTools-Manuals/src/docs/win32api/CreatePopupMenu.html
2020-06-06 20:39:00 +08:00

13 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<body>
<FONT style="FONT: 12px 宋体" color=black>
<h3>函数功能</h3>该函数创建一个下拉式菜单、子菜单或快捷菜单。此案单最初是空的但可用函数InserMenultem来插入或追加菜单项。也可用函数InsertMenu来插人菜单项用AppendMenu来追加菜单项。<br>
<h3>函数原型</h3>HMENU CreatePopupMenuVOID<br>
<h3>参数</h3>无。<br>
<h3>返回值</h3>如果函数调用成功返回值是新创建菜单的句柄。如果函数调用失败返回值是NULL。若想获得更多的错误信息请调用GetLastError函数。<br>
备注一个应用程序可增加新菜单到已存在的菜单上或者可以调用函数TrackPopupMenuEx或TrackPopupMenu来显示快捷菜单。与被分配给一个窗口的菜单相联系的资源会被自动释放。如果此菜单未被分配给一个窗口应用程序必须在关闭之前释放与菜单相连的资源。应用程序通过调用函数DestroyMenu来释放菜单资源。Windows95环境下系统可支持最多16,364个菜单句柄。<br>
<h3>速查</h3>Windows NT3.1及以上版本Windows95及以上版本Windows cE1.0及以上版本头文件winuser.h输入库user32.lib。<br>
</body>
</html>