IMAPIFormMgr::SelectFormContainer

Applies to: Outlook 2013 | Outlook 2016

Presents a dialog box that enables the user to select a form container, and returns an interface for the container object the user selected.

HRESULT SelectFormContainer(
  ULONG_PTR ulUIParam,
  ULONG ulFlags,
  LPMAPIFORMCONTAINER FAR * lppfcnt
);

Parameters

ulUIParam

[in] A handle to the parent window of the displayed dialog box.

ulFlags

[in] A bitmask of flags that controls how the form library is selected (that is, how the form container is selected). The following flags can be set:

MAPIFORM_SELECT_ALL_REGISTRIES

Selection can be made from all containers. This is the default selection type.

MAPIFORM_SELECT_FOLDER_REGISTRY_ONLY

Selection can be made only from folder containers.

MAPIFORM_SELECT_NON_FOLDER_REGISTRY_ONLY

Selection can be made only from containers that are not associated with folders.

lppfcnt

[out] A pointer to a pointer to the returned interface. This interface is for the container object that is selected by the user.

Return value

S_OK

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

Remarks

Form viewers typically call the IMAPIFormMgr::SelectFormContainer method to select a form container into which a form is installed. SelectFormContainer cannot be used to select the local form container, which has the value HFRMREG_LOCAL.

MFCMAPI reference

For MFCMAPI sample code, see the following table.

File Function Comment
MainDlg.cpp
CMainDlg::OnSelectFormContainer
MFCMAPI uses the IMAPIFormMgr::SelectFormContainer method to select a form container before rendering its contents.

See also

IMAPIFormMgr : IUnknown

MFCMAPI as a Code Sample