Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Updating ScrollBars in CSplitterWnd?

Posted on 2003-10-26
5
Medium Priority
?
377 Views
Last Modified: 2013-11-20
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();
0
Comment
Question by:GorGor1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9624836
I think you have to call
m_wndSplitter.RecalcLayout(); after setting the column info, after that call *RecalcLayout()* of frame window

Rosh :)
0
 
LVL 1

Author Comment

by:GorGor1
ID: 9690439
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.
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 11975765
Submitted to PAQ with points refunded (50)

DarthMod
Community Support Moderator
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question