February 7th, 2012, 06:36 AM
Hosting Winforms UserControl in CDialog focus problem
Im having a problem with focus hosting a winforms usercontrol within an MFC App via a CDialog.
As described in this article
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?
Thanks in advance
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!