G
Guest
CWinFormsDialog in .net 2.0 lets you host a .Net UserControl as a dialog in a
managed C++ MDI application.
I.e. in the sample:
-----------------------------------------------
#include <afxwinforms.h>
#using <WinFormUserControl1.dll>
using namespace WinFormUserControl1;
// CWinFormModeless dialog
class CWinFormModeless : public CWinFormsDialog<WinFormUserControl1Control>
{ ...}
-----------------------------------------------
Its basically a template class that lets you host any of your UserControl.
My question is, Is there any way of using a Form rather than a user control?
Is there any general way in .Net of getting from a Form to a user control?
I basically want to contain an entire form in a user control so that I can
easily add future .Net forms back into my legacy C++ MDI App.
You can show the forms without any of this bother, but when you show them
modeless, they aren't properly contained within the main app window and
dissapear behind it.
managed C++ MDI application.
I.e. in the sample:
-----------------------------------------------
#include <afxwinforms.h>
#using <WinFormUserControl1.dll>
using namespace WinFormUserControl1;
// CWinFormModeless dialog
class CWinFormModeless : public CWinFormsDialog<WinFormUserControl1Control>
{ ...}
-----------------------------------------------
Its basically a template class that lets you host any of your UserControl.
My question is, Is there any way of using a Form rather than a user control?
Is there any general way in .Net of getting from a Form to a user control?
I basically want to contain an entire form in a user control so that I can
easily add future .Net forms back into my legacy C++ MDI App.
You can show the forms without any of this bother, but when you show them
modeless, they aren't properly contained within the main app window and
dissapear behind it.