FIX: ResizeParentToFit Doesn't Work in SDI CFormViewsID: Q113585
|
Calling 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.
Because 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.
Be 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:
Q98598 Using CFormView in SDI and MDI Applications
Microsoft 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 query words: 1.00 2.00
Keywords : kb16bitonly kbDocView kbMFC kbVC
Version : 1.00
Platform : WINDOWS
Issue type :
Last Reviewed: July 27, 1999