Board index » delphi » Can't Create Child Windows in DLLs if Parent's not in DLL

Can't Create Child Windows in DLLs if Parent's not in DLL

Being a commercial software developer, I have the need to modularize
my applications through the use of DLLs.

Despite Microsoft's wishes to eliminate MDI in Windows 95, I continue
to have a need for child windows that remain clipped within a parent .

I have been able to write DLLs in Delphi that  create forms under the
calling App.  I have also been able to create mdi apps within a DLL.
As long as the MDI parent is in the DLL and not the calling App,
things work fine.  But I cannot create MDI children from a DLL that
get placed in the MDI parent of the calling App.  I thought it was
just a problem with MDI, but if I try to create any window with
ws_child in it's style, Delphi crashes.  I've tried a number of tricks
including setting the parent handle and pointer in the child form's
CreateParams.  I've tried the SetParent  and ShowWindow API calls and
did see the window, minus all it's controls and on closing, it
crashed.

The techies at Borland said this is not supported and that it may
never be becuase of Microsoft's position on SDI for the future.

Firstly, what's your oppinion on MDI being passe.  I personally think
that a bunch of open SDI windows can get confusing and cumbersom?

Secondly, has anyone found out exactly where the VCL {*word*99}s out when
dealing with the above described situation?

Thirdly, has anyone found a workaround?

Happy Thankgiving - Jeff Bullock.

 

Re:Can't Create Child Windows in DLLs if Parent's not in DLL


Being a commercial software developer, I have the need to modularize
my applications through the use of DLLs.

Despite Microsoft's wishes to eliminate MDI in Windows 95, I continue
to have a need for child windows that remain clipped within a parent .

I have been able to write DLLs in Delphi that  create forms under the
calling App.  I have also been able to create mdi apps within a DLL.
As long as the MDI parent is in the DLL and not the calling App,
things work fine.  But I cannot create MDI children from a DLL that
get placed in the MDI parent of the calling App.  I thought it was
just a problem with MDI, but if I try to create any window with
ws_child in it's style, Delphi crashes.  I've tried a number of tricks
including setting the parent handle and pointer in the child form's
CreateParams.  I've tried the SetParent  and ShowWindow API calls and
did see the window, minus all it's controls and on closing, it
crashed.

The techies at Borland said this is not supported and that it may
never be becuase of Microsoft's position on SDI for the future.

Firstly, what's your oppinion on MDI being passe.  I personally think
that a bunch of open SDI windows can get confusing and cumbersom?

Secondly, has anyone found out exactly where the VCL {*word*99}s out when
dealing with the above described situation?

Thirdly, has anyone found a workaround?

Happy Thankgiving - Jeff Bullock.

Other Threads