About the author
Recently, a question was posted on stackoverflow on how to embed an external window (created from an ActiveX DLL) into a MDI application created in Delphi.
I thought it was interesting, fired up Delphi and began tracing the default MDI app created by Delphi. In the VCL,
So, even if you created dynamic methods to handle either or both WM_MDICREATE and WM_MDIDESTROY, your methods wouldn't get called.
One way of converting an external window, into an MDI child, is by calling SetParent(TargetExternalWindowHandle, TargetNewParentWindowHandle), setting the external window's parent to the target owner's window handle.
In order to destroy the MDI child, send the WM_CLOSE to the window handle of the MDI child.
A demo of my MDI hack is available on CodeCentral.
Learn why the map is cool in Go!