The information in this article applies to:
SYMPTOMSCalling CScrollView::FillOutsideRect() incorrectly fills the area outside of the scrolling area that belongs to the CScrollView. CAUSEIn the file VIEWSCRL.CPP, in the Visual C++ MFC\SRC directory, FillOutsideRect() has the following implementation:
This implementation is incorrect because it sets rect.left and rect.right
to "m_totalDev.cy", instead of setting them equal to "m_totalDev.cx".
This causes the first rectangle filled to have its left border begin at the coordinate "m_totalDev.cy" (the bottom border of the scrollable area of the view) when it should be at the coordinate of the right border of the view (that is, "m_totalDev.cx"). Similarly, the second rectangle filled has its right border ending at the coordinate "m_totalDev.cy" (always the bottom border of the scrollable area of the view) when it should be at the coordinate of the right border of the view. RESOLUTIONModify the MFC source file, VIEWSCRL.CPP, to read as follows:
Rebuild the MFC libraries with this change. The README.TXT file in the
Visual C++ MFC\SRC directory describes how to do this.
NOTE: You will need to have your system configured to build from the command prompt. Running the MSVCVARS.BAT or VCVARS32.BAT file in your BIN directory sets your environment correctly. STATUSMicrosoft has confirmed this to be a bug in the products listed at the beginning of this article. This problem was corrected in the MFC 3.0 included with Visual C++ 2.0. MORE INFORMATIONTo reproduce this problem, open the DIBLOOK MFC sample, and use Class Wizard to map the WM_ERASEBKGND message of CDibView to the following code, taken from the online help for FillOusideRect():
After rebuilding DIBLOOK, use it to load a bitmap whose height is greater
than its width (WINNT.BMP is one example). There will be an unfilled area
at the right of the bitmap.
The problem occurs with any bitmap that has its height greater than its width. In these conditions, the area defined by
is never painted.
Additional query words: 1.00 1.50 2.00 2.10 2.50
Keywords : kbDocView kbMFC kbVC |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |