As you can see from the definitions, when I add m_pTest2DocTemplate it works fine because the CChildFrame is the same but adding m_pTest3DocTemplate starts the new view in zero size perhaps because of different frame class?
What is the strategy to add the view if their is a different frame class involved as well? The custom frame class that I am using controls the sizing requirements of the view in my case.
Did u find the error yet? In the third doc template, u r adding the reference to the first doc template. I believe this is the error...
Just change m_pTestDocTemplate in 3rd case to m_pTest3DocTemplate...
What the heck...I hope you have mistyped the code here...or else...
Sorry about it but it is just a typo in the post. I simply renamed the variable names.
I don't get any compiler error. The problem is just that the new view/frame shows in zero size, it's only the title bar you see. I can than resize the window to make it bigger but initital size is just the smallest possible.
My suspiction is confirmed though, if I change the frame class to match it to the rest of the group, my window shows up in proper size.
I found the mistake. It was not the fact that it was a different frame. The frame is getting resized to an image displayed in the view but when view is created, the image is not initialized yet - is zero so window size is zero.
I am displaying this image from the document. First I am creating new view/frame and than you use UpdateAllViews() to pass the view to display the image.
The problem is that my frame needs to be adjusted to the image size so I would really like to have access to the image when frame is created. Is there a way I can pass the image to the view at the time of creation?