网站首页  词典首页

请输入您要查询的函数:

 

术语 deletemenu
释义 DeleteMenu
语法:
BOOL DeleteMenu( HMENU hMenu,
UINT uPosition,
UINT uFlags
);
DeleteMenu功能
该DeleteMenu函数删除从指定的菜单项。如果该菜单项打开一个菜单或子菜单,这个功能破坏处理的菜单或子菜单并释放了菜单或子菜单使用的内存。
参数
hMenu
[in]句柄菜单改变。
uPosition
[in]指定的菜单项被删除,因为在uFlags参数确定。
uFlags
[in]指定如何uPosition参数解释。此参数必须是下列值之一。
MF_BYCOMMAND
指示uPosition给出了菜单项的标识符。该MF_BYCOMMAND标志是默认的标志,如果既不MF_BYCOMMAND或MF_BYPOSITION标志被指定。
MF_BYPOSITION
指示uPosition使从零开始的菜单项的相对位置。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
应用程序必须调用函数DrawMenuBar每当菜单更改,是否在菜单上显示的窗口。
例如
举例说,看到一个剪贴板查看示例。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
菜单,DrawMenuBar,RemoveMenu
==英文原文==DeleteMenu Function
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.
Syntax
BOOL DeleteMenu( HMENU hMenu,
UINT uPosition,
UINT uFlags
);
Parameters
hMenu
[in] Handle to the menu to be changed.
uPosition
[in] Specifies the menu item to be deleted, as determined by the uFlags parameter.
uFlags
[in] Specifies how the uPosition parameter is interpreted. This parameter must be one of the following values.
MF_BYCOMMAND
Indicates that uPosition gives the identifier of the menu item. The MF_BYCOMMAND flag is the default flag if neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified.
MF_BYPOSITION
Indicates that uPosition gives the zero-based relative position of the menu item.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The application must call the DrawMenuBar function whenever a menu changes, whether or not the menu is in a displayed window.
Example
For an example, see Example of a Clipboard Viewer .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Menus , DrawMenuBar , RemoveMenu
==原始网址==http://msdn.microsoft.com/en-us/library/ms647629(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:21:11