Re: Modifying FrameView
For a CFormView derived class you can change the style of the window in
PreCreateWindow, but as far as the size and position goes you will have to
do this after the window is created and you will have to do it to it's
parent frame. Changing the size and position of CFormView will not actually
do anything.
One other thing when changing the size of a CFormView. If you are creating
items that are outside the original boundary of the view then you will have
to use SetScrollSizes to set the scroll size of the CFormView to the size of
the view, so that when the user shrinks the window it would display the
scroll bars correctly.
void CFormViewTestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
//this will set the current size of the view
GetParentFrame()->SetWindowPos(NULL,0,0,500,500,SWP_NOZORDER);
//but there are controls that are outside of the
//current view, so let the view scroll them
//into view as needed
SetScrollSizes(MM_TEXT,CSize(1000,1000));
}
AliR.
"dave" <dave@discussions.microsoft.com> wrote in message
news:3642F2D5-61E9-4282-A304-CC925DC7BD6F@microsoft.com...
I mean changing size, position, styles
"AliR" wrote:
It all depends on what you mean by Modify Window?
A CFormView is pretty much the same as a CView (it's PreCreateWindow
will
get called)
AliR.
"dave" <dave@discussions.microsoft.com> wrote in message
news:B0091A8F-64CF-4AA4-AF0D-E59D56225D36@microsoft.com...
Hello:
In SDI app based on CView we can modify
Window in ::PreCreateWindow(...)
When SDI app based on CFormView above
approach doesn't work.
What can be used instead of PreCreateWindow(...)