The usercontrol displays correctly. When I first attempted to select an UI item within the usercontrol, the program hanged.
Within the OnInitDialog of the CDialog I changed it to return false, then it was OK.
I could interact with the controls inside the UserControl correctly.
return FALSE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
There are some context menus that bring up dialogs within the user-control when these menuitems are selected, the dialogs never display and it just hangs again like the initial problem?
Cant get my head round what is the problem and what I have to do to solve it?
Re: Hosting Winforms UserControl in CDialog focus problem
Originally Posted by Paul McKenzie
You do know that this forum does not deal in .NET or managed applications, right?
You should be posting in the Managed C++ forum.
Regards,
Paul McKenzie
Well apart from im calling it from a native C++ MFC App?
So really needs to be in both threads?
Can it be copied into the other as well?
Im assuming the problem is to do with the native client host rather than the managed user control.
When the user control is run from within a managed host app, no problem.
Re: Hosting Winforms UserControl in CDialog focus problem
Originally Posted by PRMARJORAM
Well apart from im calling it from a native C++ MFC App?
That makes no difference. MFC works fine when used with Native C++.
What you are asking for is to fix or diagnose a NET issue. All of those functions in the call stack are .NET functions. Not only that, any Forms related questions also go in the Managed C++ forum.
Bookmarks