SDK可中用CreatMenu()建的菜单用完后是否要删除?

lifanxi 2002-12-10 09:47:56
{
HMENU hMenu;
hMenu = CreateMenu();
AppendMenu(....);
....
//这里要不要删除hMenu句柄?
}
...全文
83 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lifanxi 2002-12-15
  • 打赏
  • 举报
回复
我这里的MSDN上是这样说的:
Resources associated with a menu that is assigned to a window are freed automatically. If the menu is not assigned to a window, an application must free system resources associated with the menu before closing. An application frees menu resources by calling the DestroyMenu function.
也就是说,作为一个窗口的菜单,会自动释放。其它的菜单要人工释放。
程序的色彩 2002-12-10
  • 打赏
  • 举报
回复
不用
zswzwy 2002-12-10
  • 打赏
  • 举报
回复
不用
ColderRain 2002-12-10
  • 打赏
  • 举报
回复
有撤消函数。

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧