FIX: ResizeParentToFit Doesn't Work in SDI CFormViewsLast reviewed: September 18, 1997Article ID: Q113585 |
1.00
WINDOWS
kbprg kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSCalling CScrollView::ResizeParentToFit(TRUE) in a CFormView's OnInitialUpdate() to let the size of the view dictate the size of its frame window causes the frame window to become greatly enlarged.
CAUSEBecause the view window has not yet been displayed, ResizeParentToFit(TRUE) uses the size of the CFormView. The CFormView is created with size CRect(0,0,0,0), and therefore the view size is miscalculated and a rather large window is created.
RESOLUTIONBe sure to call GetParentFrame()->RecalcLayout() to set the view window's size correctly before calling ReSizeParentToFit(TRUE). For additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q98598 TITLE : Using CFormView in SDI and MDI Applications STATUSMicrosoft has confirmed this to be a problem in the Microsoft Foundation Class Libraries version 2.0. This problem was corrected in the Microsoft Foundation Class Libraries version 2.5.
|
Additional reference words: 1.00 2.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |