Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Connection-Points in ActiveX Control

Posted on 1999-07-22
Medium Priority
Last Modified: 2006-11-17
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 ?
Question by:NetaCaspi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Accepted Solution

Tommy Hui earned 200 total points
ID: 1200800
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.

Author Comment

ID: 1200801
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 ?

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question