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 CreateComposeFormmethod creates a Compose Message Form.

Syntax

HRESULT CreateComposeForm(
  IMessageFormHostEx * 
phost,
  LPMESSAGE 
pmsg,
  FORMTYPE 
eFormType,
  LPMESSAGE 
pMsgBase,
  MESSAGEFIELDS * 
pMsgFields,
  HWND 
hwndForm,
  HWND * 
phwndBody,
  IMessageFormEx ** 
ppForm
);

Parameters

phost

[in] Reference to the IMessageFormHostExobject that allows the form to communicate with Messaging.

pmsg

[in] Reference to the IMessageobject to compose.

eFormType

[in] The type of form, specified by the IFormProviderEx::FORMTYPEenumeration.

pMsgBase

[in] Reference to the IMessageto use to pre-fill the form, if one exists.

pMsgFields

[in] Reference to the MESSAGEFIELDSstructure for the new message.

hwndForm

[out] Handle of the Compose Message Form's frame.

phwndBody

[out] Reference to the handle belonging to the Compose Message Form's body window.

ppForm

[out] Reference to the newly created Compose Message Form ( IMessageFormEx) object.

Return Value

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK

Indicates success.

Remarks

CreateComposeFormis called by Messaging to create the form that is used to create messages for your custom form. The form creates a window as a child of the Messaging window.

CreateComposeFormreturns a handle to the window it has created and a handle to an IMessageFormExinterface. When Messaging calls this method, it passes an IMessageFormHostExpointer that allows the custom form to communicate with the Messaging Application.

Requirements

Header cemapi.h
Library cemapi.lib
Windows Embedded CE Windows CE .NET 4.2 and later
Windows Mobile Pocket PC for Windows Mobile 2003 and later, Smartphone for Windows Mobile 2003 and later

See Also

Reference

IFormProviderEx

Other Resources

Messaging