IMAPIMessageSite::MoveMessage

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 page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Moves the current message to a folder.

HRESULT MoveMessage(
  LPFOLDER pFolderDestination,
  LPMAPIVIEWCONTEXT pViewContext,
  LPCRECT prcPosRect
);

Parameters

  • pFolderDestination
    [in] A pointer to the folder where the message is to be moved.

  • pViewContext
    [in] A pointer to a view context object.

  • prcPosRect
    [in] A pointer to a RECT structure that contains the current form's window size and position. The next form displayed also uses this window rectangle.

Return Value

  • S_OK
    The call succeeded and has returned the expected value or values.

  • MAPI_E_NO_SUPPORT
    The operation is not supported by this message site.

Remarks

Form objects call the IMAPIMessageSite::MoveMessage method to move the current message to a new folder.

Notes to Implementers

A form viewer's implementation of MoveMessage must call the IMAPIViewContext::ActivateNext method, passing the VCDIR_MOVE flag, before actually moving the message to a new folder. To obtain the RECT structure used by a form's window, call the Windows GetWindowRect function.

For a list of interfaces related to form servers, see MAPI Form Interfaces.

Notes to Callers

Following the return of MoveMessage, forms must check for a current message and then dismiss themselves if none exists.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

MyMAPIFormViewer.cpp

CMyMAPIFormViewer::MoveMessage

Not implemented.

See Also

Reference

IMAPIViewContext::ActivateNext

IMAPIMessageSite : IUnknown

Concepts

MFCMAPI as a Code Sample

MAPI Form Interfaces