CMailMessage::DeletePart Method  
 
BOOL DeletePart(
  INT nMessagePart  
);

The DeletePart method deletes the specified message part from the multipart message. The memory allocated for the message part is released.

Parameters

nMessagePart
The message part index to delete.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This method cannot be used to delete part zero, which is the main body of the message. Instead use the Clear method to clear the entire message.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csmsgv10.lib
Unicode: Implemented as Unicode and ANSI versions.

See Also

CreatePart, CreatePart, GetPart, GetPartCount, ClearMessage, SetPart