Three mapping explanations of MFC-based ActiveX control demoCtrl + demo

message map:

  • Allow ActiveX control programs to receive event notifications sent by the system, such as form creation and closing events
  • Respond to operating system messages

Schedule Mapping:

  • Allows external callers (containers containing ActiveX) to easily access the properties and methods of ActiveX controls
  • The interface function that can be called externally, the common one is that a control can call its internal function, such as CButton btn; btn. function name ()

Event Mapping:

  • Enables ActiveX controls to send event notifications to external callers (containers containing ActiveX)
  • Click, double-click and other events are responded to by the container passed to it by ocx, such as some events of the button, which can be processed in its parent window after being triggered

  • Add scheduling mapping: class view > click demolib > right-click demo > add method
  • Add event mapping: class view > click demolib > right-click demoEvents > add method
  • demo attached: OCX Demo

Introduction to ocx analysis
VS2010 to create OCX controls

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325924838&siteId=291194637