Share via


CComControl::FireOnRequestEdit

Notifies the container's sink that a control property is about to change and that the object is asking the sink how to proceed.

HRESULT FireOnRequestEdit( 
   DISPID dispID  
);

Parameters

  • dispID
    [in] Identifier of the property about to change.

Return Value

One of the standard HRESULT values.

Remarks

If your control class derives from IPropertyNotifySink, this method calls CFirePropNotifyEvent::FireOnRequestEdit to notify all connected IPropertyNotifySink interfaces that the specified control property is about to change. If your control class does not derive from IPropertyNotifySink, this method returns S_OK.

This method is safe to call even if your control doesn't support connection points.

Example

STDMETHODIMP CMyControl::put_MyTitle(BSTR newVal)
{
   // the DISPID for MyTitle in this example is 4
   DISPID dispID = 4;

   // make sure we can change the property 
   if (FireOnRequestEdit(dispID) == S_FALSE)
      return S_FALSE;

   // store newVal in CComBstr member
   m_bstrMyTitle = newVal;

   // signal that the property has been changed
   FireOnChanged(dispID);

   return S_OK;
}

Requirements

Header: atlctl.h

See Also

Reference

CComControl Class

CComControl::FireOnChanged

Other Resources

CComControl Members