Using Visual C++ 6, what is the easiest way to build a bare bones
ActiveX control that can be embedded in a web page? I don't need info
on how to script it from the web page. I just need to know how to
generate the C++ code to build it.
It is unclear to me how to do this from any of the available wizards
and I can't understand why every tech book or MSDN article I pick up
which talks about ActiveX controls requires 3 chapters or 100 pages of
howto material when I can create a normal ATL COM object in 10 seconds
with a wizard. I just want to be able to distribute some code through
the browser. |
Request for Question Clarification by
mathtalk-ga
on
15 Aug 2003 08:10 PDT
Hi, code_blazer-ga:
Although you ask about the "easiest way to build a bare bones ActiveX
control" with VC++ 6 (presumably to use from a client-side script
under IE), I suspect the heart of your question is either about
implementing some specific functionality or about downloading and
"registering" the component from within the browser.
I can provide links to building controls with automation interfaces,
which in a narrow sense addresses your question, but I'm seeking
clarification that this is what you want before proceeding. See my
comment below for a bit more on the subject.
regards, mathtalk-ga
|
Clarification of Question by
code_blazer-ga
on
17 Aug 2003 10:40 PDT
Yes, you are correct in that I simply want to create an activex
control that self-registers and doesn't do anything really. For
example, it could just throw up a dialog box. I see that when I try
to add a control to the ATL COM object wizard, there are 2 things that
I'm guessing look like they may be relevant: the HTML control and the
HTML lite control. I need to know which one, if either, i should
choose and which interfaces are important for understanding how to
develop an internet ActiveX control. I'm already quite familiar with
how to develop a "simple" ATL COM object. Thanks.
|
Request for Question Clarification by
mathtalk-ga
on
18 Aug 2003 08:01 PDT
Hi, code_blazer-ga:
In building ATL COM objects have you had occasion to edit the IDL
files that the wizard produces for you? I suspect this may be the
missing ingredient.
Under VC++ 6.0 the ATL wizard assigns some constant values for the
DISP_ID associated with the dispatch interface, but what is really
needed for automation are some "enumerations" that (at runtime) will
allow the COM initialization of the object to be in synch with these
interfaces.
I'm planning to provide some links to simple projects that illustrate
what you want (compiling simple ATL COM "servers" that can be
instantiated and used from within a client-side Web page), but it
would help me to fine tune my write-up if I knew a little about your
experience with IDL.
My impression is that one of the key improvements to ATL within the
Visual Studio .Net IDE is that the ATL component wizard now does a
more complete job of constructing the automation interfaces. However
I realize that you are only interested in what can be done with the
VC++ 6.0 wizard, and my answer will be limited to that subject.
regards, mathtalk-ga
|
Clarification of Question by
code_blazer-ga
on
18 Aug 2003 10:17 PDT
yes, i've worked with IDL files quite a bit. again, i'm interested to
know what interfaces the object needs beyond what a simple object with
a custom interface has.
|