IOleInPlaceFrame::EnableModeless

Enables or disables a frame's modeless dialog boxes.

HRESULT EnableModeless(
  BOOL fEnable  //Enable or disable modeless dialog box windows
);
 

Parameter

fEnable
[in] Specifies whether the modeless dialog box windows are to be enabled by specifying TRUE or disabled by specifying FALSE.

Return Values

This method supports the standard return value E_UNEXPECTED, as well as the following:

S_OK
The dialog box was either enabled or disabled successfully, depending on the value for fEnable.

Remarks

Notes to Callers

The active in-place object calls IOleInPlaceFrame::EnableModeless to enable or disable modeless dialog boxes that the container might be displaying. To display a modal dialog box, the object first calls IOleInPlaceFrame::EnableModeless, specifying FALSE to disable the container's modeless dialog box windows. After completion, the object calls IOleInPlaceFrame::EnableModeless, specifying TRUE to reenable them.

Notes to Implementers

You should track the value of EnableModeless and check it before displaying a dialog box.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in oleidl.h.

See Also

IOleInPlaceActiveObject::EnableModeless