
set the MDI parent of MDI child forms that are in a DLL
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have received two responses thus far, and would like to report my
findings to the group:
It _is_ possible to use the SetParent API function to set the MDI
parent of an MDI child from a DLL. The child DLL needs to return some
value (a reference to the form, or other value) that the parent MDI
can use to get the child's hWnd (window handle) in order to use the
SetParent method.
Acording to "cbarrett" there is a great article in the March 1999
edition of Visual Basic Programmers Journal (VBPJ), but you would have
to subscribe to get it since most news stands are still carrying the
February edition.
Clearly, this is an important issue, which I will continue to follow
up on until I am comfortable with the answer to my question. I would
encourage fellow practictioners to contribute to this body of
knowledge so that we may all benefit.
Regards,
Dave Sanabria
Programmer
PRT Group, Inc.
Quote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>I am trying to architect an application that will be developed in
>parallel across a team of programmers. Each programmer will be tasked
>with developing an testing their components, which will have forms
>etc.
>The problem that I have found is that an MDI form in a DLL doesn't
>know about the MDI parent of the primary application, and thus
>generates an error.
>There is an API called SetParent which I unsuccesfully tried to use.
I
>have not tried to use the RegisterClass method yet becuase I am
>developing a prototype that need to function by tomorrow:
>Private Declare Function RegisterClass Lib "user32" _
> Alias "RegisterClassA" (Class As WNDCLASS) As Long
>If anyone has doen this before, I would appreciate some insight into
>how this is accomplished. CC by email would be appreciated.
>Thanks,
>Dave Sanabria
>PRT Group, Inc.
>-----BEGIN PGP SIGNATURE-----
>Version: PGPfreeware 6.0 for non-commercial use <http://www.pgp.com>
>iQA/AwUBNr9fE21prxj8x53BEQIiVACg6WEkrauRYNVX4hqcHmHuCFZePKYAn2mT
>VhZvJSjf3xmB+ET7h5uXmZXP
>=2+IK
>-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.0 for non-commercial use <http://www.pgp.com>
iQA/AwUBNsGa5m1prxj8x53BEQKm2ACgvtseeQBeX/IWubljX5l5wgi0SdwAoIj6
DZsr9ieXqtT/yeD+hdNIeszy
=jHDv
-----END PGP SIGNATURE-----