Partilhar via


COccManager::OnEvent

Called by the framework to handle the specified event.

virtual BOOL OnEvent(
   CCmdTarget* pCmdTarget,
   UINT idCtrl,
   AFX_EVENT* pEvent,
   AFX_CMDHANDLERINFO* pHandlerInfo 
);

Parameters

  • pCmdTarget
    A pointer to the CCmdTarget object attempting to handle the event

  • idCtrl
    The resource ID of the control.

  • pEvent
    The event being handled.

  • pHandlerInfo
    If not NULL, OnEvent fills in the pTarget and pmf members of the AFX_CMDHANDLERINFO structure instead of dispatching the command. Typically, this parameter should be NULL.

Return Value

Nonzero if the event was handled, otherwise zero.

Remarks

Override this function to customize the default event-handling process.

Requirements

Header: afxocc.h

See Also

Reference

COccManager Class

Hierarchy Chart

Other Resources

COccManager Members