Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I added multiple windows in one tab control of main parent dialogue,it added successfully but whenever I'm run the program that time it runs an application but after pressing the escape button it loses all the controls in child windows, what I do for it?
Posted
Comments
ThatsAlok 6-Dec-12 8:35am    
Apology, you question is not clear, do you meant to say that, when you press escape key and the control is deleted or child window get closed!
Venkat Raghvan 6-Dec-12 9:10am    
yes the controls are deleted, window remains as it is!!
ThatsAlok 6-Dec-12 9:34am    
In the Design mode or in the Running app
Venkat Raghvan 7-Dec-12 1:55am    
in running app

1 solution

In the child dialogs (the ones you insert in the tab control) you need to override the OnCancel method of the MFC CDialog (or CDialogEx)
And do nothing in it, not even calling the base method:
C++
void CMySubDialog::OnCancel()
{
// CDialogEx::OnCancel();
}
 
Share this answer
 
Comments
Venkat Raghvan 7-Dec-12 7:37am    
Sorry!! but this is not working,it run as previous one!
Venkat Raghvan 9-Dec-12 23:42pm    
One more think I observed that, whenever I click on the respective tab containing child windows after that escape button pressed,it resulted invisible all the controls in the respective child form & parent window looked like that it repaint with white colour.
Help me please
Pascal-78 10-Dec-12 8:11am    
Can you post a small project that reproduces this behaviour?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900