CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    36

    user form control in mfc project

    Hi all,

    I'm trying to import in my MFC project some custom form user controls made with c#. Now if I try to import them in a dialog following the msdn tutorial I have no problem. Instead If i try to import them in a cpanedialog I'm not able to initialize the control (if I look at the control value in debug mode it is always NULL). Now my question is:
    It is possible to host the control or it is the same situation of the dialogbar in which as MSDN said can not be host form control?

    PS To host the control I have included the clr support than I have made these three passage:

    1) in header file I have add CWinFormsControl<mbrPropertyGrid::PropertyGrid> m_ctrl;
    2)then to the cpp file of the panedialog I have added a DDX control where IDC_CTRL2 is a static tex used as placeholder DDX_ManagedControl(pDX, IDC_CTRL2, m_ctrl);
    3) at least in a specific method I use the control

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: user form control in mfc project

    [ moved ]

  3. #3
    Join Date
    Oct 2008
    Posts
    36

    Re: user form control in mfc project

    Excuse me if I post in the wrong forum but I thought that an MFC project should be discussed in MFC section also if it host a .NET control. Could anyone help me resolve my problem?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured