Re: VB ActiveX to VC 2005
- From: "Michael Tissington" <mtissington@xxxxxxxxxxxxxxxx>
- Date: Tue, 27 Mar 2007 14:05:19 -0700
Thanks for the info.
"MrAsm" <mrasm@xxxxxxx> wrote in message
news:ptth03tfu9odpi9qgfe59vqg49c3hkokqd@xxxxxxxxxx
On Mon, 26 Mar 2007 09:02:27 -0700, "Michael Tissington"
<mtissington@xxxxxxxxxxxxxxxx> wrote:
No - I want to rewrite my VB6 ActiveX control in VC8
Hi,
Maybe I did not understand your question well, but: are you aware that
building ActiveX controls in Visual Basic 6 and in Visual C++ are
*very different* kinds of jobs?
Using VB6 is much more easier; it's the VB6 drag-and-drop RAD
approach, with only some coding...
Please don't expect this RAD-style simplicity from Visual C++...
In fact, building an ActiveX with Visual C++ means choosing one of the
following options:
1. Raw C/C++ and Win32 (very hard path!)
2. Use C++ and MFC (more easy)
3. Use C++ and ATL
I would choose between 2 and 3.
If you already know MFC, you may consider option 2.
However, ATL is more focused than MFC on COM and ActiveX development
(in fact, ATL used to be the acronym for ActiveX Template Library - I
don't know if Microsoft changed the acronym words more recently...)
(In a way, ATL is to COM what MFC is to Win32 API.)
ATL offers you a set of disjoint C++ templates, while MFC contains an
interconnected hierarchy of classes.
So, with ATL you don't pay the size (or speed) penalty for a given
feature, unless you use it in your ActiveX.
ATL is leaner than MFC. Being made by C++ templates, ATL is just
compiled into source code: you don't need external DLLs or MFC static
libraries.
...Even if, with modern hardware and broad-band Internet connections,
this size/speed issues are not very important IMHO...
Morever, ATL uses multiple inheritance a lot (and it does make sense,
and I don't understand why the "gurus" who designed the new languages
like C# are against multiple inheritance; it seems that multiple
inheritance is only available in C++, not in Java nor in C#.)
However, it seems that MFC and ATL have been kind of "merged" together
in more modern Visual C++ compilers (in VS.NET 2003 there is a common
directory "atlmfc", and it seems that VS.NET MFC's CString is common
to ATL CString template - I don't know about VS2005, but I think that
this trend continues.). So, you could mix ATL and MFC to get the power
from both worlds.
MrAsm
.
- Follow-Ups:
- Re: VB ActiveX to VC 2005
- From: MrAsm
- Re: VB ActiveX to VC 2005
- References:
- RE: VB ActiveX to VC 2005
- From: Charles Wang[MSFT]
- Re: VB ActiveX to VC 2005
- From: Michael Tissington
- Re: VB ActiveX to VC 2005
- From: MrAsm
- RE: VB ActiveX to VC 2005
- Prev by Date: tabs inside a tab
- Next by Date: tabs inside a tab
- Previous by thread: Re: VB ActiveX to VC 2005
- Next by thread: Re: VB ActiveX to VC 2005
- Index(es):
Relevant Pages
|