Re-use ATL GUI component in another ATL GUI component 
Author Message
 Re-use ATL GUI component in another ATL GUI component

I've written a few ATL GUI components that are working well on their own.
However, I need to improve upon one so that it may include the capability of
another.

One of them is a grid control which allows in-cell editing. Currently, I've
only used standard Windows controls (edit, updown, combo, etc.) for my work
up until now. I create an instance of each of these by using CreateWindow...
What I'd like to do is re-use one of my existing ATL components as an
in-cell edit facility!

What sort of updates would I have to do (and is it possible within the scope
of the controls) to dynamically instantiate one of my ATL components from my
main ATL component? I would need to be able to get it to display it's GUI,
be positioned correctly and not forgetting must be able to implement the
Connection Point sink interface to pick up when 'data' has been completed.

All components are write with VC++ 6 with ATL 3. No MFC is available (or
indeed wanted as these are lightweight controls with zero dependancies).

Thanks in advance!



Mon, 19 Jul 2004 06:03:54 GMT  
 Re-use ATL GUI component in another ATL GUI component
See KB Article Q218442 "HOWTO: Dynamically Add ActiveX Controls to ATL
Composite Control" and Q192560 "HOWTO: Adding ATL Control Containment
Support to Any Window"
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> I've written a few ATL GUI components that are working well on their
own.
> However, I need to improve upon one so that it may include the
capability of
> another.

> One of them is a grid control which allows in-cell editing. Currently,
I've
> only used standard Windows controls (edit, updown, combo, etc.) for my
work
> up until now. I create an instance of each of these by using
CreateWindow...
> What I'd like to do is re-use one of my existing ATL components as an
> in-cell edit facility!

> What sort of updates would I have to do (and is it possible within the
scope
> of the controls) to dynamically instantiate one of my ATL components
from my
> main ATL component? I would need to be able to get it to display it's
GUI,
> be positioned correctly and not forgetting must be able to implement
the
> Connection Point sink interface to pick up when 'data' has been
completed.

> All components are write with VC++ 6 with ATL 3. No MFC is available
(or
> indeed wanted as these are lightweight controls with zero
dependancies).

> Thanks in advance!



Mon, 19 Jul 2004 06:05:15 GMT  
 Re-use ATL GUI component in another ATL GUI component
Thanks for the KB article references - I had come to the conclusion that I
needed to become a Container but didn't want to start digging such a large
hole if I didn't have to!


Quote:
> See KB Article Q218442 "HOWTO: Dynamically Add ActiveX Controls to ATL
> Composite Control" and Q192560 "HOWTO: Adding ATL Control Containment
> Support to Any Window"
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



> > I've written a few ATL GUI components that are working well on their
> own.
> > However, I need to improve upon one so that it may include the
> capability of
> > another.

> > One of them is a grid control which allows in-cell editing. Currently,
> I've
> > only used standard Windows controls (edit, updown, combo, etc.) for my
> work
> > up until now. I create an instance of each of these by using
> CreateWindow...
> > What I'd like to do is re-use one of my existing ATL components as an
> > in-cell edit facility!

> > What sort of updates would I have to do (and is it possible within the
> scope
> > of the controls) to dynamically instantiate one of my ATL components
> from my
> > main ATL component? I would need to be able to get it to display it's
> GUI,
> > be positioned correctly and not forgetting must be able to implement
> the
> > Connection Point sink interface to pick up when 'data' has been
> completed.

> > All components are write with VC++ 6 with ATL 3. No MFC is available
> (or
> > indeed wanted as these are lightweight controls with zero
> dependancies).

> > Thanks in advance!



Mon, 19 Jul 2004 07:57:08 GMT  
 Re-use ATL GUI component in another ATL GUI component
An update - excellent! It was far easier than I expected!!! Cheers (Ok I'm
happy!). I tracked down the ATL Control Containment FAQ
1
033)
and it was plain as day after all!


Quote:
> See KB Article Q218442 "HOWTO: Dynamically Add ActiveX Controls to ATL
> Composite Control" and Q192560 "HOWTO: Adding ATL Control Containment
> Support to Any Window"
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken



> > I've written a few ATL GUI components that are working well on their
> own.
> > However, I need to improve upon one so that it may include the
> capability of
> > another.

> > One of them is a grid control which allows in-cell editing. Currently,
> I've
> > only used standard Windows controls (edit, updown, combo, etc.) for my
> work
> > up until now. I create an instance of each of these by using
> CreateWindow...
> > What I'd like to do is re-use one of my existing ATL components as an
> > in-cell edit facility!

> > What sort of updates would I have to do (and is it possible within the
> scope
> > of the controls) to dynamically instantiate one of my ATL components
> from my
> > main ATL component? I would need to be able to get it to display it's
> GUI,
> > be positioned correctly and not forgetting must be able to implement
> the
> > Connection Point sink interface to pick up when 'data' has been
> completed.

> > All components are write with VC++ 6 with ATL 3. No MFC is available
> (or
> > indeed wanted as these are lightweight controls with zero
> dependancies).

> > Thanks in advance!



Mon, 19 Jul 2004 09:32:12 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem converting VC6 ATL component to a .NET 2003 VC ATL component

2. GUI components lose their property values

3. GUI components as COM objects

4. Thread that calls GUI component kills program

5. Using CDaoDatabase/CDaoRecordset from inside an ATL/MFC COM Component

6. creating com+ component using atl smartptr

7. Serial Port ATL Component used in Excel

8. debugging C++/ATL components used in ASP

9. Writing ATL components to be used by Active Server Pages

10. Using an existing ATL component in Visual C

11. Using an existing ATL component in Visual C

12. Using ATL Active Server Components in VBScript??

 

 
Powered by phpBB® Forum Software