CalendarNewAppointment

4/8/2010

The CalendarNewAppointment function launches the Outlook Mobile Calendar application—directly into the Compose Form for a new Appointment item.

Syntax

HRESULT CalendarNewAppointment();

Remarks

This function is one of two that increases the Home Screen extensibility options available to OEMs and Mobile Operators. The other function is ContactsNewContact. Both functions significantly decrease the difficulty associated with creating custom Home Screen and Home screen plug-ins that enable programmatic navigation of the Outlook Mobile, Messaging, and Phone applications.

The CalendarNewAppointment function allows a plug-in or application to programmatically launch the Calendar application into its Compose Form to allow users to create a new Appointment item—all without having to simulate keystrokes.

This behavior is the same as if the user started entering information for a new Appointment item into the Calendar Compose Form, navigated away to the Home Screen, and then returned to the Calendar application.

The Compose Form is displayed as if the user tapped New Appointment (Soft Key 2) from the Calendar menu.

If the Calendar application Compose Form or another dialog box is already being displayed when CalendarNewAppointment is called, then that window's contents must be saved, the window dismissed (with Cancel (Soft Key 2))—and then CalendarNewAppointment can be called.

Note that, beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.**

Return Value

This function returns the following:

  • S_OK
    The function completed successfully.
  • E_FAIL
    The function call failed.

Requirements

Header appnav.h
Library aygshell.lib
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

Reference

ContactsNewContact

Other Resources

Creating Custom Plug-ins for Launching Outlook Mobile Applications
PhoneShowCallLog