Partager via


COleClientItem::OnRemoveMenus

Called by the framework to remove the container's menus from the specified composite menu when in-place activation ends.

virtual void OnRemoveMenus(
   CMenu* pMenuShared 
);

Parameters

  • pMenuShared
    Points to the composite menu constructed by calls to the OnInsertMenus member function.

Remarks

The default implementation removes from pMenuShared the in-place container menus, that is, the File, Container, and Window menu groups. Override this function if the default implementation is not appropriate for your application; for example, if your application does not use document templates for associating resources with document types. If you override this function, you should probably override OnInsertMenus and OnSetMenu as well. This is an advanced overridable.

The submenus on pMenuShared may be shared by more than one composite menu if the server has repeatedly called OnInsertMenus. Therefore you should not delete any submenus in your override of OnRemoveMenus; you should only detach them.

For more information, see IOleInPlaceFrame::RemoveMenus in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleClientItem Class

Hierarchy Chart

COleClientItem::OnInsertMenus

COleClientItem::OnSetMenu

Other Resources

COleClientItem Members