L
Lord Phoenix
Hi everyone,
I am quite new here, and actually no so old to C/C++ either.
To put things in perspctive I only use C or rather C++ (MSCV 6) to build
tool library's (either standard DLL or COM / OCX), so my knowledge is pretty
much rudimentary complemented by some experience and a lot of wizard / mfc
usage.
Now for my problem:
I've been comissioned to build an OCX wrapper for 3 DLLs. Along with this
the wrapper will also provide a bit of extra functionality of it's own, but
it is basically a wrapper.
I've also been asked to do it by encapsulating each DLL's functionality has
a 'collection', for lack of a better term. Has an examble consider the
TreeView control Nodes collection. When you type TreeView1.Nodes. you get a
list of properties/methods that you can use. Like count, wich returns a node
count. So what I need is something on the lines of
Wrapper.DLL1.somepropertyormethod, etc for the other two DLLs.
My problem is I can do this in COM/ATL/WFC by simply creating a separate
class for each DLL and then write on the appropriate IDispath entries. The
classes themselfs are not available, so they cannot be instanciated, and all
of they're exposed functionality is available through a
Wrapper.DLL1.whatever .
But how do I pull this off in a OCX ?! The wizard is of no help here. Trying
to do it by hand, has if it were a COM has only led to compile messages. To
top it off, the classes are visible and can be instantiated separately,
probably due to the fact that I do have OleAutomation enabled for all of
them.
So question, how do I pull off the 'collection' look alike ? And most
importantly how do I make the other classes private instead of public ?
If you can point me towards an example out there it would be even better,
has I tend to learn faster that way.
Thanks for your help.
I am quite new here, and actually no so old to C/C++ either.
To put things in perspctive I only use C or rather C++ (MSCV 6) to build
tool library's (either standard DLL or COM / OCX), so my knowledge is pretty
much rudimentary complemented by some experience and a lot of wizard / mfc
usage.
Now for my problem:
I've been comissioned to build an OCX wrapper for 3 DLLs. Along with this
the wrapper will also provide a bit of extra functionality of it's own, but
it is basically a wrapper.
I've also been asked to do it by encapsulating each DLL's functionality has
a 'collection', for lack of a better term. Has an examble consider the
TreeView control Nodes collection. When you type TreeView1.Nodes. you get a
list of properties/methods that you can use. Like count, wich returns a node
count. So what I need is something on the lines of
Wrapper.DLL1.somepropertyormethod, etc for the other two DLLs.
My problem is I can do this in COM/ATL/WFC by simply creating a separate
class for each DLL and then write on the appropriate IDispath entries. The
classes themselfs are not available, so they cannot be instanciated, and all
of they're exposed functionality is available through a
Wrapper.DLL1.whatever .
But how do I pull this off in a OCX ?! The wizard is of no help here. Trying
to do it by hand, has if it were a COM has only led to compile messages. To
top it off, the classes are visible and can be instantiated separately,
probably due to the fact that I do have OleAutomation enabled for all of
them.
So question, how do I pull off the 'collection' look alike ? And most
importantly how do I make the other classes private instead of public ?
If you can point me towards an example out there it would be even better,
has I tend to learn faster that way.
Thanks for your help.