Solved

Updating ScrollBars in CSplitterWnd?

Posted on 2003-10-26
5
361 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 31
centeredAverage challenge 8 124
only14 challenge 19 64
Unix Command -- Challenging  question 7 79
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now