7.5.4 Combined Menu Items

Pop-up and normal menu items are often combined in menus. A mixture of the two is shown in the following example:

POPUP ITEM
    NORMAL ITEM
    NORMAL ITEM
    .
    .
    .
    NORMAL ITEM
    NORMAL ITEM (fItemFlags contains the MF_END constant)

Note that the terminating item is a normal menu item, not a pop-up item, and that the fItemFlags member in the last item contains the MF_END constant.

Pop-up and normal menu items can also be nested to create hierarchical blocks, as shown in the following example:

POPUP ITEM
    NORMAL ITEM
    NORMAL ITEM
    .
    .
    .
    NORMAL ITEM
    POPUP ITEM
        NORMAL ITEM
        NORMAL ITEM
        NORMAL ITEM
        POPUP ITEM (fItemFlags contains the MF_END constant)
            NORMAL ITEM
            NORMAL ITEM (fItemFlags contains the MF_END constant)
    NORMAL ITEM (fItemFlags contains the MF_END constant)

Note that, although the pop-up menu item has its own terminating item, the terminating item for the entire menu is again a normal menu item.