Don,

The problem occurs because you ActiveX DLL does not include a MDI form. Thus when you load your form in the ActiveX DLL which has its MDIClient an error occurs.

Basically what you want to do is to make your form a MDI_Client at run time. The only solution I could find so far is to use a set of API calls.

For your information an MDI form consist out of two windows. The one your looking for is the MDI_Client Window. (If you need more information on this subject see the Dan Appleman Book on the Win32 API). You need to make your form a client to that Window.

I don't have the exact code on me right now, but I can mail it to if you like. It's about two lines. For now I will give you the procedure.

1) Get handle to the MDI_Client Window use the GetWindow API call

2) Set your forms parent to the MDI_Client window with the SetParent API call

Your window is now part of the MDI form. However it will behave somewhat different when maximizing the form.

I hope this was a little bit helpful,

Regards,

Erik