Click to See Complete Forum and Search --> : ATL event sinking


PeterGilboy
November 9th, 1999, 12:15 PM
I have a control that I have written using Visual C++ 6.0 and ATL. It works fine until I try and sink events from the control using WithEvents e.g.


Dim withevents ctlMyControl as ATLControl
.
.
set ctlMyControl = form1.ctlInstance



This gives the following error when it hits the "Set" line:

This component doesn't support this set of events (Error 459)

What am I doing wrong?

Any suggestions greatly appreciated!