Ed II
2009-03-17 10:42:01 UTC
Hello,
I am writing a MDI Doc/View application using CFormView. At Program start I
open always the same documents and I want to arrange the views in the same
orientation as at the last run. Each View may have a different size. The sum
of all Views represent a complete System.
My problem is, that I could not serialize the correct Parameters and then
define the correct View at start up of the application. Since all my
approaches failed I am using
pMainFrame->MDITile(MDITILE_SKIPDISABLED);
which is not what I want.
One of my last attempts was to serialize the coordinates at
CMyMDIChild::OnDestroy()
{
CView* pView = GetActiveView();
CRect objRect;
pView->GetClientRect(&objRect);
}
and to reuse the coordinates in
CMyMDIChild::PreCreateWindow(CREATESTRUCT& cs)
{}
by modifying the cs-Coordinates, but this failed.
Is it generally possible to arrange the Views in a MDI Doc/View application,
or is this limited by the Framework.
I would highly appreciate any comments which will help to fix this problem.
Best regards
ed
I am writing a MDI Doc/View application using CFormView. At Program start I
open always the same documents and I want to arrange the views in the same
orientation as at the last run. Each View may have a different size. The sum
of all Views represent a complete System.
My problem is, that I could not serialize the correct Parameters and then
define the correct View at start up of the application. Since all my
approaches failed I am using
pMainFrame->MDITile(MDITILE_SKIPDISABLED);
which is not what I want.
One of my last attempts was to serialize the coordinates at
CMyMDIChild::OnDestroy()
{
CView* pView = GetActiveView();
CRect objRect;
pView->GetClientRect(&objRect);
}
and to reuse the coordinates in
CMyMDIChild::PreCreateWindow(CREATESTRUCT& cs)
{}
by modifying the cs-Coordinates, but this failed.
Is it generally possible to arrange the Views in a MDI Doc/View application,
or is this limited by the Framework.
I would highly appreciate any comments which will help to fix this problem.
Best regards
ed