网站首页  词典首页

请输入您要查询的函数:

 

术语 setmenu
释义 SetMenu
语法:
BOOL SetMenu( HWND hWnd,
HMENU hMenu
);
SetMenu函数
该SetMenu函数分配一个新的菜单到指定的窗口。
参数
hWnd
[in]句柄窗口的菜单是被分配。
hMenu
[in] Handle to the new menu.如果该参数为NULL,则窗口的当前菜单被删除。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
窗口重绘,以反映菜单的变化。一个菜单可以被分配到任何窗口不是子窗口。
该SetMenu函数取代了以前的菜单,如果有的话,但它不破坏它。应用程序应调用DestroyMenu函数来完成这项任务。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
菜单,DestroyMenu,GetMenu
==英文原文==SetMenu Function
The SetMenu function assigns a new menu to the specified window.
Syntax
BOOL SetMenu( HWND hWnd,
HMENU hMenu
);
Parameters
hWnd
[in] Handle to the window to which the menu is to be assigned.
hMenu
[in] Handle to the new menu. If this parameter is NULL, the window's current menu is removed.
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 window is redrawn to reflect the menu change. A menu can be assigned to any window that is not a child window.
The SetMenu function replaces the previous menu, if any, but it does not destroy it. An application should call the DestroyMenu function to accomplish this task.
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 , DestroyMenu , GetMenu
==原始网址==http://msdn.microsoft.com/en-us/library/ms647995(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 11:31:41