Updating ScrollBars in CSplitterWnd?

GorGor1
GorGor1 used Ask the Experts™
on
I created a static splitter window with 2 columns.  I set the initial size of both.  What I'm trying to do, at runtime, is let the splitter window know that the column 1 pane requires horizontal scrollbars if its client area is smaller than, say, 500 pixels.  If its client area is greater than 500 pixels, then the scroll bars shouldn't be visible.  I'd also like to do the same with the vertical.  I don't want to effect both panes.  Here is my current code.  I tried to use SetColumnInfo(...) to force the scrollbars to appear, but that hasn't seemed to work.  Any ideas??

result = m_wndSplitter.CreateStatic(this, 1, 2);
    if(result == 0) return FALSE;

result = m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CMenuFormView), menuSize, pContext);
    if(result == 0) return FALSE;

result = m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRecFormView), viewSize, pContext);
    if(result == 0) return FALSE;

m_wndSplitter.SetColumnInfo(1, 10000, 100); //<-this didn't work
RecalcLayout();
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I think you have to call
m_wndSplitter.RecalcLayout(); after setting the column info, after that call *RecalcLayout()* of frame window

Rosh :)

Author

Commented:
My requirements have changed slightly.  I need to completely get rid of scrollbars in the CSplitterWnd.  I don't want them.  Ever.  I've tried just about everything I can think of to remove the scrollbars in the CSplitterWnd.  I haven't tried deriving a class from CSplitterWnd since I can't see how that will help.  Any ideas how to eliminate the scrollbars?

Thanks again.
Commented:
Submitted to PAQ with points refunded (50)

DarthMod
Community Support Moderator

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial