CScrollView in a static CSplitterWnd pane
Posted on 1997-04-06
I am trying to put a CScrollView-derived view in
the lower right pane of a CSplitterWnd with 4 static
panes, using MSVC 4.0. The other three panes are
derived from CView.
This worked fine in my last 16-bit app (MSVC 1.52)
but with MSVC 4.0, calling ResizeParentToFit() from
the OnSize() method of CScrollView only works properly
if both dimensions of the pane are smaller than the
logical view size (and both the horiz and vert
scrollbars appear). If only one dimension is smaller,
then 1 scrollbar should appear, but it doesn't.
Stepping through the OnSize() code, the scrollbar actually
does appear, but disappears shortly thereafter (I believe
that it disappears when the View background is erased).
The scrollbar disappears sometime after all OnSize()
methods have been processed by the four views, the
CSplitterWnd, and the enclosing CFrameWnd. It is gone by
the time CScrollView::OnDraw() is called. I don't know
what else to trap to narrow down the problem.