
Modify Activex Control Properties from other Activex Control.
Connection Point is not the only way to notify something to the client
(event callback), If your client is written in VB, then you need implement
IConectionPoint and IConnectionPointContainer interfaces in the object
anyhow. But if the client is VC++ and just using a vtbl interface, you
don't
have to follow the Connection Point world.
Define an outgoing interface such as IMyEvSink with one or more methods,
and add a method that can teach the client's IMyEvSinkl interface to your
server object - such as RegisterClient( [in] IUnknown*).
Your app which will implement the IMyEvSink i/f passes its pointer through
the
RegisterClient and the server object restores the true IMyEvSink from the
passed IUnknown. Then your server object will be able to invoke the methods
in the IMyEvSink any time !
This mechanism works both DLL and EXE server (EXE server requires proxy DLL
though) as long as your client in written in VC++ and uses vtbl interface.
makoto
Quote:
> First of all Let me tell you that I am newbie programming with ATL COM, I
> just started to make some ATL controls, now I have the following
situation.
> I made a control which I called LoginCtl that load a login dialog when the
> user make click over it, if the user is authenticated the dialog is
closed,
> all that work fine but my intention with this controls is set read only
some
> text box controls that co-exist with the LoginCtl in the same container. I
> want to sent a message to the container to lock up the controls that I
want
> to put read only. I have read about connection-points but still is a
little
> fuzzy for me that implementation. Please give me a glue about how can I
> achieve this. I hope you apologize me because my bad English and
understand
> my situation. Just I need a small sample or few lines of implementation.
> Please give a glue about how can I achieve this if this is possible, or
just
> tell me that is impossible.
> Thanks in advanced.
> Geolffrey.