15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Insert activeX controls _only_

Jeff Wishnie -- jwishnie@adobe.com
Wednesday, November 20, 1996

Environment:  VC++ 4.2b, NT 4.0

I would like users of my app to be able to insert ActiveX controls into
their documents from a standard OLE insert dialog BUT I want to make sure
they only insert ActiveX, no OLE documents or servers or anything.

AND I want to remove non-ActiveX options like linking or inserting as an icon.

Looking at COleInsertDialog I see various flags that set defaults to
display one sort of OLE object or another, but no way of telling it to
_only_ display ActiveX controls in the list-box that the user chooses from.

On the other hand, the Control Pad tool that comes with the ActiveX SDK
does _exactly_ what I'd like, but does not come with source.

MY questions are:

1. does anyone know if there is source availble for Control Pad?

2. If I write my own dialog class, is there a blessed way of finding all
the installed ActiveX controls? It looks like I can walk the registry and
examine every CSLID entry for controls, but does anyone know of some
simpler method, something along the lines of EnumFontFamiliesEx for
ActiveEx controls (e.g. EnumActiveX)?

Thanks!

- jeff




Mike Blaszczak -- mikeblas@nwlink.com
Wednesday, November 27, 1996

At 15:48 11/20/96 -0800, Jeff Wishnie wrote:
>Environment:  VC++ 4.2b, NT 4.0

>1. does anyone know if there is source availble for Control Pad?

Source for the ActiveX control pad isn't available.

>2. If I write my own dialog class, is there a blessed way of finding all
>the installed ActiveX controls? It looks like I can walk the registry and
>examine every CSLID entry for controls, but does anyone know of some
>simpler method, something along the lines of EnumFontFamiliesEx for
>ActiveEx controls (e.g. EnumActiveX)?

You have to walk the registry.  There's no enumeration functions.
Code that already does this isn't hard to find.  I've published at least
two examples; one in my book and one in MSJ.

.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |