Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrollbars in CSplitterWnd

Status
Not open for further replies.

gorgor

Programmer
Aug 15, 2002
164
US
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();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top