Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Updating ScrollBars in CSplitterWnd?

Posted on 2003-10-26
5
Medium Priority
?
379 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

886 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