Solved

Updating ScrollBars in CSplitterWnd?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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. …
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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

21 Experts available now in Live!

Get 1:1 Help Now