Microsoft DirectX 9.0


The ReleaseFocus method sets the focus object to NULL in the resource manager if the current focus object is the one specified in this method.


HRESULT ReleaseFocus(
  IUnknown *pFocusObject



[in] Pointer to the focus object.

Return Value

Returns an HRESULT value that depends on the implementation. HRESULT can be one of the following standard constants, or other values not listed.

Return code Description
E_FAIL Failure.
E_POINTER Null pointer argument.
E_INVALIDARG Invalid argument.
E_NOTIMPL Method isn't supported.
S_OK or NOERROR Success.


Use this method when the object of focus is about to be destroyed to ensure that the focus is not still being referenced.

See Also