Export (0) Print
Expand All

IItem::Edit

Windows Mobile 6.5
4/8/2010

The Edit method opens the PIM item for editing in it's Edit tab.


HRESULT Edit(
  HWND hwndParent
);

hwndParent

[in] Handle to the parent window.

This method returns the standard values, , , , and, as well as the following:

S_OK

The method completed successfully.

E_INVALIDARG

The hwndParent parameter was invalid.

E_OUTOFMEMORY

Not enough memory to complete the operation.

E_ACCESSDENIED

Insufficient permissions. Access denied.

E_UNEXPECTED

Unexpected error.

E_FAIL

The method failed.

E_NOTIMPL

The method was called on an item of type OlAppointmentItem on Windows Mobile Standard.

S_FALSE

The user clicked Cancel to discard the changes.

You can call IItem::Edit on unsaved as well as saved PIM items.

IItem::Edit is not supported for Appointment items on Windows Mobile Standard.

The following code example demonstrates how to use Edit.

Bb415512.note(en-us,MSDN.10).gifNote:
To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
HRESULT EditExample(IItem *pItem)
{
    HRESULT hr   = E_FAIL;
    HWND    hWnd = NULL;
    // You should set the hWnd to the window you want the summary card to be parented to.
    // If hWnd = NULL, then it uses the hwnd passed into IPOutlookApp::Logon.
    // The edit card that is displayed depends upon the item type.
    hr = pItem->Edit(hWnd);
    // This statement is reached when the edit card is dismissed.
    return hr;
}

Headerpimstore.h
LibraryPimstore.lib
Windows MobilePocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

Reference

IItem
OlItemType

Other Resources


Community Additions

ADD
Show:
© 2014 Microsoft