CMenu::InsertMenu

Call this member function to insert a new menu item at the position specified by nPosition, and move other items down the menu.

Syntax

BOOL InsertMenu( UINT nPosition, UINT nFlags, UINT nIDNewItem = 0, LPCTSTR lpszNewItem = NULL );

BOOL InsertMenu( UINT nPosition, UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

Windows CE doesn't support the MF_BITMAP flag or the MF_DISABLED flag in the nFlags parameter. Menu items can't be disabled without being grayed. To disable a menu item use the MF_GRAYED flag.

Windows CE 1.0 doesn't support cascading menus. If you're using version 1.0, you can't insert an MF_POPUP menu into another pop-up menu.

See Also

CMenu Overview, CMenu Member Functions, Menu Classes, CMenu::AppendMenu, CMenu::Detach