Hi,
I have a classic Win32 application, which should stay developed for some
more time, until a brand new product is finished. It would be nice to write
new modules in .NET WinForms and dock them as child windows in the old Win32
Frame window. Is this thinkable ?
The issues I see:
1. Child window relationship
I can use SetParent API to host the child Form, this looks to work fine. But
when the form gets hidden and shown again, it gets new window handle. Is
this behavior described anywhere ?
2. Message loop
Can the hosting Win32 application do message handling also for .NET windows
just with GetMessage/TranslateMessage/DispatchMessage? It appears to work
but I have strange feeling about going around .NET's message loop ... Using
separate threads would be better, I think, but much less comfortable.
Is there a clean way to do this or is it impossible ? I will appreciate all
opinions and resources.
I remember there was a possibility to register a .NET control as ActiveX in
Beta version of Framework. How did that work ? Could it be used anyhow now ?
Thanks for answers,
Jan
Morten Overgaard - 26 May 2004 21:22 GMT
MFC 7.1 supports hosting .Net usercontrols ( as ActiveX Controls )
http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx
I have succesfully done it.
Regards Morten
> Hi,
> I have a classic Win32 application, which should stay developed for some
[quoted text clipped - 22 lines]
> Thanks for answers,
> Jan
Jan Hornych - 27 May 2004 07:34 GMT
Thanks, Morten, this looks interesting.
Regards,
Jan
> MFC 7.1 supports hosting .Net usercontrols ( as ActiveX Controls )
> http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx
[quoted text clipped - 36 lines]
> > Thanks for answers,
> > Jan