• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

Connection-Points in ActiveX Control

why use connection-points in an ActiveX-Control ?
I know I can handle events through the regular mechanism of
msg-map. my ActiveX Control is to be run in the browser.
Are connection-points alternative to the msg-map mechanism ?
0
NetaCaspi
Asked:
NetaCaspi
1 Solution
 
Tommy HuiEngineerCommented:
Message maps and connection points are different things. A message map is implemented in the control, which is a window, and the message map allows the object to handle Windows messages such as WM_LBUTTONDOWN, etc. Connection points are used to communicate from the control to any client that wishes to know about the control's events. The control is the source of the event. The client creates (or implements) a sink that will be called when the event occurs.

You're confusing "events". There are two different types of events: one that is generated by Windows for you window/control. This is handled by the message maps. The other type of events is generated by your control intended for its clients. That is handled by connection points.
0
 
NetaCaspiAuthor Commented:
Who can be client to an ActiveX Control ? Is the browser is a client or a container ? Does the 'client' need to have some code to be prepared to deal with the connection-points or can I use connection-points in my control without worring to the client ? I am using ATL and when I used their samples, they used connection-points without adding code to some other application (i.e. the client). Can you please elaborate on those issues ?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now