-
An application has been designed with an mdi form and several child forms. This application uses a dll that has a form that comes up when a menu item is clicked on. How can i make the form that appears from the dll a child form of the main application's form i.e. the form in the dll that's being used by the form in the application?
-
Form in DLL
May it's a better way to rebuild that form into an ActiceX component, if possible.
That way you can implement this on the child-form of your application. Every new created instance of that child-form will then have also that component.
Hope this helps a little bit.
With kind regards,
Dennis
-
thanks dennis,
I don't understand what you are saying. The problem is that the activeX component's (i.e. the dll's) form is the form that i want to be a child form of the main application's form. So, when a select a menu item that creates an instance of the component, the component's form should show up as a child form. Does that make thing clearer?
regards
Shakeel
-
child form
You can try to use a SetParent function, where the first parameter is handle of child window (form.hwnd) and the second parameter is a handle of parent window.
But this is good only for child window which is not MDI !
If you have already solved this problem, please send me the info how. I have a similar problem, but I want to insert a MDI child window and I still do not now how.
Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Martin
[email protected]