Re: SplitterWnd problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



Mark F. wrote:

I have an SDI app with a CScrollView splitter. The top pane is

swapped

with a CListView to display files. The bottom pane displays images.

The

problem is that when the bottom pane is finished the listview is
corrupted. How can I fix this.

Thanks.


Thanks for the reply. That won't work. I think the problem is the way
that the view is drawn (OnDraw). Since the CScrollView is split and uses
the same document, when the bottom pane is drawn to show the image the
top pane is destroyed. Also the views are never switched once created in
the MainFrame class.

I don't know what's wrong, but your description of the windows seems all mixed up. The splitter splits the mainframe client area into two panes. Each pane contains a view. In your case, the CScrollView should only occupy the bottom pane. Its painting should have no effect on the painting of the top pane's view. In other words, the splitter does not, and is not expected to, split the CScrollView. If your CScrollView is painting the other pane then you did not create it properly. You can use the Spy++ tool to find out whether it is bigger than the bottom pane (it should not be).


--
Scott McPhillips [VC++ MVP]

.



Relevant Pages

  • Re: Display a CListCtrl in a CScrollView
    ... Have you tried using a CListView instead of a CScrollView. ... will scroll for you as well and it will fill the whole pane. ... Tom ... I want to display a CListCtrl. ...
    (microsoft.public.vc.mfc)
  • Re: Show images in CSplitterWnd
    ... > And I defined the CPictureView based on the CScrollView class. ... > The other way is to show the images in CPictureView, defined based on the CScrollView. ... Do I need to create three CPictureView classes in the MainFrm, and attach each of them to the corresponding pane? ...
    (microsoft.public.vc.mfc)