Sink to ActiveX control from WebBrowser View

I embeded an ActiveX (MSCOMCTL.OCX TreeView) control in to my HTML resource. <OBJECT> </OBJECT> I then LoadResource(xxxx); on it. It displays okay, and I can set nodes, but how do I get the ITreeViewEvents in my CHTMLView derived class. I tried setting up a connectionpoint, but the object does not respond to the following code

IDispatch *pObjdisp = NULL;
IConnectionPointContainer *pConnCon = NULL;
IConnectionPoint *pConn = NULL;

pObjElem->get_object(&pObjdisp);
pObjdisp->QueryInterface(IID_IConnectionPointContainer, (void **)&pConnCon);
pConnCon->FindConnectionPoint(IID_IConnectionPoint, &pConn);

//next call advise on pConn


pConn is always NULL. Is there a better way to sync with an ActiveX control in this situation.

Thanks,
Tony.
Tony_SebastianAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GlennDeanCommented:
Tony:
   You don't call FindConnectionPoint with IID_IConnectionPoint, but rather the IID of the interface that the client has implemented.  For ex,
pConnCon->FindConnectionPoint(IID_IMySinkInterface,&pConn);

   pConn will then be set to the server's implementation for the connection point for that very particular IID_IMySinkInterface.  You then call Advise on pConn to add your implementation of IMySinkInterface to the one or more clients who have sent in their implementations of the interface to the server.

   Glenn
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tony_SebastianAuthor Commented:
I tried that before. After reading your comment I tried again and realized I was using the IID for the wrong Treeview version.

Thanks,
Tony.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.