Link to home
Start Free TrialLog in
Avatar of David Gray
David Gray

asked on

Removing Scroll Bars from a single Splitter Window Pane

How do you remove scroll bars from a single pane of a splitter window?  I have a MDI application set up with one of the child windows as a splitter window.  There are four panes in my splitter window and I want to remove the vertical and horizontal scroll bars from one pane and not the rest.  Also the view I want to remove the scroll bars from is a  CFormView that has a grid control on it with my own set of scroll bars.  Thus, I have a redundant set of scroll bars, but I want to keep my own and not the window frame's scroll bars.  The MDI child windows are also maximized at all times and have the WS_SYMENU feature removed.

Thanks for your help.
Avatar of David Gray
David Gray

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of rhgaracci
rhgaracci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is an even better way.

In OnSize() add the line

   EnableScrollBarCtrl(SB_BOTH,FALSE);

instead of what I recommended before.
Best yet, in the OnSize() method, bypass the CFormView::Onsize(...) and call the CView::OnSize() method.  This works just fine and is the most efficient.  Sorry this answer has been incremental.
Your first two solutions didn't seem to work, but the third solution solved my problem.  Thanks for the tip.
Glad to be of service.  I used the ViewEx MFC sample to experiment with in seeking the solution.  I also looked in the MFC source code for CFormView and CScrollView to figure out how they handled scrolling.