# IOleInPlaceActiveObject::EnableModeless

Enables or disables modeless dialog boxes when the container creates or destroys a modal dialog box.

HRESULT EnableModeless(

BOOL fEnable | //Enable or disable modeless dialog box windows
); |

Parameter

fEnable
  [in] TRUE to enable modeless dialog box windows; FALSE to disable them.

Return Value

S_OK
  The method completed successfully.

Remarks

#### Notes to Callers

IOleInPlaceActiveObject::EnableModeless is called by the top-level container to enable and disable modeless dialog boxes that the object displays. For the container to display a modal dialog box, it must first call IOleInPlaceActiveObject::EnableModeless, specifying FALSE to disable the object’s modeless dialog box windows. When the container is through displaying its modal dialog box, it calls IOleInPlaceActiveObject::EnableModeless, specifying TRUE to reenable the object’s modeless dialog boxes.

See Also

IOleInPlaceFrame::EnableModeless