Hi,
I'm not sure if this is the best group to post this issue on, but I'll
try.
I have an existing MFC doc/view application, To this application I've
made a C# plugin interface for hosting
.NET controls in the CView. I'm using CWinFormsControl<Control> to
manage the unmanged/manage hosting. The .NET assembly is responsible
for all the .NET control creations, and only the Control^ is given to
the MFC View for it to host it. So this senario leads me to use:
CreateManagedControl( i_ctrl,WS_VISIBLE|WS_CHILD|WS_TABSTOP,
CRect(0,0,0,0), i_pParent, 0);
Where i_ctr is the running instance of the control^, and i_pParent is
the parent CWnd*.
My problem is that when a UserControl of many TextBoxes (all .NET) is
presented, the Tab order doesn't work. Neither does the "Return" key
in the TextBoxes. The only thing that happens is a biip. These are all
singlelline textboxes, and the Tab order is given. When debugging, I
see that the Parent property of the UserControl is null, even though
i_pParent != NULL. I'm not sure if this is the root of the problem or
not.
I also have a C# test application where everything works fine. (Here
the parent is the correct Control).
Hope anybody can help me out.
Regards,
Kjetil.
Sheng Jiang[MVP] - 28 Mar 2008 20:34 GMT
I am not sure if these behaviors need a parent form. See if calling MFC
message filters from a .net message pump works for you or not. You can
search "CMFCWinFormHybridApp" for the source code.--
Sheng Jiang
Microsoft MVP in VC++
> Hi,
> I'm not sure if this is the best group to post this issue on, but I'll
[quoted text clipped - 28 lines]
> Regards,
> Kjetil.
kli@scandpowerpt.com - 31 Mar 2008 07:34 GMT
Hi,
and thanks for your reply.
I tried to locate the source code for CMFCWinFormHybridApp, but I was
unable to find it.
Could you please give me an url to it?
Regards,
Kjetil.
On 28 Mar, 22:26, "Sheng Jiang[MVP]" <sheng_ji...@hotmail.com.discuss>
wrote:
> I am not sure if these behaviors need a parent form. See if callingMFC
> message filters from a .net message pump works for you or not. You can
[quoted text clipped - 40 lines]
>
> - Show quoted text -