
Using Common Dialog control within an ActiveX DLL
I've been trying to get a DLL to contain an MS Common Dialog Control for
days now, to no avail. The problem is that DLL's don't seem to be able to
create OCX controls in and of themselves. I can give the DLL a
"Reference..." to the component, but I can't create a "New" one inside.
I can, however:
1) Place a dialog control on a _form_
2) Declare a handle within the DLL (without using "New"), like so:
Private dlgFind As MSComDlg.CommonDialog
3) In the form's setup routine, assign the DLL's handle to the
control that actually exists on the form (via a property)
4) Once that's done, I can use "dlgFind" within the DLL
These steps work, but it's a lot of extra management I'd rather do
without. Is there some way to just create the dialog control within the
DLL itself?
Thanks in advance for any help,
--Laurent Stanevich