Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

The Editmethod opens the PIM item for editing in it's Edittab.

Syntax

HRESULT Edit(
  HWND 
hwndParent
);

Parameters

hwndParent

[in] Handle to the parent window.

Return Value

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

S_OK

The method completed successfully.

E_INVALIDARG

The hwndParentparameter 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 OlAppointmentItemon Windows Mobile Standard.

S_FALSE

The user clicked Cancelto discard the changes.

Remarks

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

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

Code Example

The following code example demonstrates how to use Edit.

Note:
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.
Copy Code
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;
}

Requirements

Header pimstore.h
Library Pimstore.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

IItem
OlItemType

Other Resources