I am facing a strange problem regarding tabs under a tab. I have createda dialog containing a PropertySheet say MainSheet . In this sheet , I am adding 4 pages . One of the pages , further contains a PropertySheet,Say ChildSheet , in which I am adding 7 pages.
I am using MSVC 5 - windows 95 and using the Application wizard and Class wizard for most of the code generation .
Now on executing the application , I am facing this strange problem . If initially , I click any tab twice in the ChildSheet (why twice ? One for making that tab , an active page and second for setting the focus on that tab), then I get no trouble and clicking any tab in the MainSheet works smoothly.Note that I have to do this only once.Afterwords , this restriction is relaxed :-)
Now if I don't do that , i.e setting focus to any tab in the ChildSheet , before trying to click any tab in the Mainsheet (accept the one , who is the parent of ChildSheet ) the application is HANGED .
So this application needs a bit smarter user for handling :-) To run smoothly or to be hanged.
I have got with me one solution for that , But I am afraid that it is concerned with the performance issue as in future these tabs will be having high interaction with data base server .
The above mentioned problem won't occur , If I create the ChildSheet every time , in OnSetActive() message and delete it in OnKillActive() message in that tab of MainSheet which is responsible for creating the childSheet.However , in the above Strange Case , I was creating the ChildSheet once in the OnInitDialog().
Any suggestion for the appropriate solution is highly appreciated.One more thing, I also tried to programmatically put the focus on any tab in the childSheet in the start of application execution but it won't work .