BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
AFX_EVENT *pEvent = (AFX_EVENT *)pExtra;
//If this is a control notification event.
if (nCode == CN_EVENT)
// If we have information on this event.
// Event DISPID is stored at pEvent->m_dispid
// Event DISPPARAMS are stored at pEvent->m_pDispParams
// Handle the event from here...
return CWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);