Shortcut menu extensions that target Office Mobile applications often process information in clipboard format. The following sample demonstrates code used by such a component.
Note: |
|---|
|
Object Identifiers (OIDs) in the pira parameter below, can be used in Pocket Outlook Object Model (POOM) API calls. These API members are declared in the header file Pimstore.h. You can get a handle to a POOM item by calling the |
For more information on IDataObject, see the Windows Embedded CE topic,
Code Example
The following code example demonstrates how to implement IDataObject.
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 | |
|---|---|
#include "appext.h" // To access ItemRef and ItemRefArray. FORMATETC fmt; STGMEDIUM stgmed; ItemRefArray * pira; CEOID oid; fmt.cfFormat = RegisterClipboardFormat(CFNAME_ITEMREFARRAY); fmt.lindex = -1; fmt.dwAspect = DVASPECT_CONTENT; fmt.tymed = TYMED_HGLOBAL; ((IDataObject*)GetSite())->GetData(&fmt, &stgmed); pira = (ItemRefArray*)stgmed->hGlobal; oid = (CEOID)pira->rgRefs[0].pRef; | |
See Also
Note: