Windows Mobile 6 Professional Style New Button (Windows Embedded CE 6.0)

1/6/2010

The AYGShell API extensions provide a Windows Mobile Professional and Windows Mobile Classic style New button, which can be added to an application menu bar. The New button can be used to create items specific to the host application or items associated with all applications running on the target device. For example, on a PDA, the New button can be configured to create documents, contacts, tasks, appointments, and so on.

The New button has two parts to it, a button area and a menu area, indicated by a small up arrow. When a user chooses the button area, a new item of the default type for that application is created. When a user chooses the menu area, the New button displays a menu that gives the user a choice of the type of new item to create.

The New button menu is divided into two sections. The lower section contains global entries that are consistent throughout the run-time image. They are displayed no matter what application is hosting the New button. The upper portion of the New button menu is a dynamic section that contains temporary entries that are specific to the hosting application.

On a Windows Embedded CE-based device, the New button appears on an application's menu bar. This differs from the implementation on a Windows Mobile Professional or Windows Mobile Classic device, where the New button is always located in the lower-left corner of the target device's screen. This means that, unlike Windows Mobile Professional and Windows Mobile Classic, if you have several application windows open at once it may be possible to see several New button menus on the screen at once. The lower portion of each of these menus is the same, but the upper portions are unique.

The New button appears on all application menu bars that were created with SHCreateMenuBar and that included the IDM_SHAREDNEW or IDM_SHAREDNEWDEFAULT resource ID in their menu bar resource files. These resource IDs define the type of New button menu associated with your New button. In both cases, the OS dynamically populates the New button menu with entries from other applications that have registered global menu entries. If a user chooses one of these global menu entries, then the command is serviced by an external application. Specifying IDM_SHAREDNEWDEFAULT limits the New button menu to just using the global entries. Specifying IDM_SHAREDNEW allows an application to extend the list of items in the New button menu with its own entries. Commands for items selected from the extended entries are processed by the specific application.

An OEM can change the presentation of the New button menu by setting the named value CoolMenu in the registry.

If you create a New button using IDM_SHAREDNEW and if the OEM has set CoolMenu to 1 in run-time image on your target device, then the TBSTYLE_DROPDOWN style is added to your New button. Your New button supports a New button menu.

If you create a New button using IDM_SHAREDNEW and if the OEM has not set CoolMenu to 1 in the run-time image on your target device, then you must specify the TBSTYLE_DROPDOWN style on the New button yourself. If you do not do so, then the menu bar is unable to process input from your New button and that input is passed to the application as a button press.

The following topics provide additional information about the New button menu:

See Also

Reference

Toolbar Styles

Concepts

AYGShell API Extensions

Other Resources