Modify Activex Control Properties from other Activex Control. 
Author Message
 Modify Activex Control Properties from other Activex Control.

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.



Sun, 21 Sep 2003 03:41:27 GMT  
 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.



Sat, 20 Sep 2003 16:21:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Modify Activex Control Properties from other Activex Control.

2. Control webbrowser ActiveX control in composit ActiveX control

3. ActiveX control inside another activex control

4. Need help with ActiveX control containing other activex controls

5. ATL ActiveX Control hosting code fails to initialize ActiveX Controls on Win9x

6. ActiveX control inside another ActiveX control

7. Need help with ActiveX control containing other activex controls

8. ActiveX control in an ActiveX control

9. ActiveX-control inside ActiveX-control

10. Custom ActiveX control built on a Standard (comctl32.ocx) ActiveX Control

11. Windowless ActiveX control/ Transparent ActiveX control

12. Newbie?ActiveX Control in ActiveX Control

 

 
Powered by phpBB® Forum Software