Is visual inheritance supported by WinForm Designer in MVS 2008 for C++/CLI? RRS feed

  • Question

  • I have programmatic success in instantiating a user class/form that inherits another user class that in turn is derived from System::Windows::Forms::Form. But, the WinForm designer fails to load/display this form, and complains:

    <small>The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: CWizardExample --- The base class 'ATPGUI.CWizardFormBase' could not be loaded. Ensure the assembly has been referenced and that all projects have been built. </small>

    But, if I replace this line:

    Collapse | Copy Code
    ref class CWizardExample : public ATPGUI::CWizardFormBase
    with this:

    Collapse | Copy Code
    public ref class CWizardExample : public System::Windows::Forms::Form
    the WinForm designer can load/display the form. But, I will not have access to WinForm-based control/properties defined in CWizardFormBase. I do have access to those defined in CWizardExample.

    The CWizardExample class begins as follows:

    Collapse | Copy Code
    public ref class CWizardFormBase : public System::Windows::Forms::Form
    All sources reside in the same MVS 2008 WinForm application project.

    Thanks in advance!
    Tuesday, March 15, 2011 7:38 PM

All replies

  • The Windows Forms designer is showing the error message as expected. If you want to discuss limitations of the Windows Forms designer, visit the Windows Forms Designer forum.

    This forum is for the windbg tool.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP

    Tuesday, March 15, 2011 9:52 PM