IMAPIMessageSite::MoveMessage

The IMAPIMessageSite::MoveMessage method moves the current message to a folder.

Quick Info

See IMAPIMessageSite : IUnknown.

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

Parameters

pFolderDestination
[in] Pointer to the folder where the message is moved.
pViewContext
[in] Pointer to a view context object.
prcPosRect
[in] Pointer to a RECT structure containing the current form's window size and position. The next form displayed also uses this window rectangle.

Return Values

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, prior to 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.

See Also

IMAPIViewContext::ActivateNext