ICodeNavigate::DisplayDefaultEventHandler

Displays the default event handler for an object.

HRESULT DisplayDefaultEventHandler(
  
LPSTR lpstrObjectName
);

Parameter

lpstrObjectName

[in] Pointer to the name of an object.

Return Values

The return value obtained from HRESULT is one of the following:

Return Value Meaning
S_OK Success.
E_INVALIDARG The argument is invalid.

Comments

A designer calls the DisplayDefaultEventHandler method to display the default event handler for the named object. The name passed in lpstrObjectName refers to the property that returns the object. This name appears in the type information for the ActiveX designer. Examples are "Button1" and "Form1."

Example

The following example queries for the SCodeNavigate service and calls the DisplayDefaultEventHandler method. The variable pwstr gives the name of the object for which to display the event handler.

hr = m_pServiceProvider->QueryService(SID_SCodeNavigate, 
   IID_ICodeNavigate, (void **)&pNavigate);
if (FAILED(hr)) return;

pNavigate->DisplayDefaultEventHandler(pwstr);
pNavigate->Release();

See Also

ICodeNavigate2