|
-
May 1st, 1999, 12:53 PM
#1
Form View
I want the frame to be the exact size of the view. I don't manage to do that. I think I have to set for one hand the scroll size of the view, and for other hand to resize the frame.
Am I right ?
-
May 1st, 1999, 02:40 PM
#2
Re: Form View
Have you looked at CScrollView::ResizeParentToFit
which is inherited into CFormView?
Roger
-
May 2nd, 1999, 07:33 AM
#3
Re: Form View
thanks for the tip, I don't use the CScrollView so often. I put this code in my view :
void CBopView::OnSize( UINT nType, int cx, int cy )
{
CFormView::OnSize( nType, cx, cy ) ;
if ( GetParentFrame()->GetSafeHwnd() )
{
SetScaleToFitSize( CSize( 100, 100 ) ) ;
ResizeParentToFit() ;
GetParentFrame()->RecalcLayout() ;
}
}
I don't manage to get the size of the dialog template of the form. Do you have any type for this?
-
May 2nd, 1999, 10:58 AM
#4
Re: Form View
Sorry, I should have given an example. The following code seems to work in VC++6:
void CFormtestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit(FALSE);
}
Cheers,
Roger
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|