Menus

A menu is a list of menu items. Choosing a menu item opens a submenu or causes the application to carry out a command. Each menu must have an owner window. Windows CE sends messages to a menu's owner window when the user selects the menu or chooses an item from the menu.

    

Menu

All menus in Windows CE are implemented as top-level pop-up windows. A pop-up menu is a floating menu that displays commands specific to the object selected by the user or to the object's immediate context.

When the user chooses a command item, Windows CE sends a WM_COMMAND message to the window that owns the menu. Each menu item that opens a submenu is associated with a handle to that corresponding submenu. When the user points to such an item, Windows CE opens the submenu. No command message is sent to the owner window; however, Windows sends it a WM_INITMENUPOPUP message before displaying the submenu. You can get the handle to the submenu associated with an item by using the GetSubMenu or GetMenuItemInfo function.