Use the END_EVENT_MAP macro to end the definition of your event map.
END_EVENT_MAP( )
Header: afxctl.h