Call this member function to insert a new menu item at the position specified by nPosition, and move other items down the menu.
BOOL InsertMenu( UINT nPosition, UINT nFlags, UINT nIDNewItem = 0, LPCTSTR lpszNewItem = NULL );
BOOL InsertMenu( UINT nPosition, UINT nFlags, UINT nIDNewItem, const CBitmap* pBmp );
Header File | Afxwin.h |
Platforms | |
Versions | 1.0 and later |
Complete documentation | Visual C++ documentation |
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.
CMenu Overview, CMenu Member Functions, Menu Classes, CMenu::AppendMenu, CMenu::Detach