Mixing ATL and MC++
-
I'm not at all new to .NET but I am new to MC++ and had some questions for a control I'm working on, which is hosting either the WebBrowser control or MSHTML. If I declare a managed class with
__gc class
, can I still derive from ATL templated classes? I know I can use unmanaged function calls within managed methods, but I'm not sure I can mix the two in class definitions. Any help or suggestions would be much appreciated.
Reminiscent of my younger years... 10 LOAD "SCISSORS" 20 RUN
-
I'm not at all new to .NET but I am new to MC++ and had some questions for a control I'm working on, which is hosting either the WebBrowser control or MSHTML. If I declare a managed class with
__gc class
, can I still derive from ATL templated classes? I know I can use unmanaged function calls within managed methods, but I'm not sure I can mix the two in class definitions. Any help or suggestions would be much appreciated.
Reminiscent of my younger years... 10 LOAD "SCISSORS" 20 RUN
Hello Heath, Welcome to MC++. I think you should start by reading the MC++ reference document. It is small and straight. Download the word format and print it if you wish to work with the MC++. Now, to your question. You cannot derive __gc class from __nogc class or vice versa. You can have each as members (wrapper stuff). For controls you can subclass and superclass where necessary. In my recent project, we had MFC ActiveX GIS control and wanted to port it to .NET. I quickly reworked the rendering in ATL/WTL and with MC++ got it working. Best regards, Paul. Jesus Christ is LOVE! Please tell somebody.