
ActiveX interface magic requested (advanced ActiveX/VB/MFC question)
Hi there.
I'm making a visual ActiveX control in MFC for use in VB. This control
should preferable allow the user to select a "skin" at design time. I'd like
to provide the same functionality you find in a VB ListView. Here you can
set a reference to an ImageList contained on the form at design time, This
will specify how the icons are drawn.
I thought about this - scratched my head - but cannot seem answer the
following questions:
- How do I retrieve information in the ActiveX control from VB about which
Imagelists are available (to show in custom setup property sheet). It seems
that it might be some kind of ambient property that is supported by the VB
IDE.
- The mechanism for making the selected ImageList persistent is also a bit
vague. In ListView the imagelist itself is stored outside the controls
property bag with only the name of the ImageList stored in ListViews
property bag. But then you will require to obtain a reference to the
ImageList hosted by VB at creation time. Very tricky...
I wonder if any of you people have some {*filter*} knowledge of this area. It
is a rather interesting challenge I think :-)
/Tim Magnussen