?
Solved

List control doesn't scroll

Posted on 1997-03-14
1
Medium Priority
?
187 Views
Last Modified: 2013-11-20
I have a list control in an MFC 4.0 app (using VC++ 4.0) that I fill with a list of drives when the program first starts.  The problem that I am finding is that it does not put scroll bars up in the beginning.  So if there are more drives than will appear at first, you have to click on the LAST visible item, and THEN the vertical scroll bar appears, and you can get to the ones below it.   How do I get around this?  I want the vertical scroll there if there are more than are visible, and not if they are all visible.  

And here is anything I can think of to say about it:
It is a CListCtrl object in one pane of a Splitter window.  It is currently set to use Small Icon display.  
0
Comment
Question by:eye
[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
1 Comment
 
LVL 4

Accepted Solution

by:
mbhakta earned 150 total points
ID: 1300233
Try doing a InvalidateRect() for the listcontrol once you have finished adding the items to it. This will cause a forced paint of the object and cause all necessary scrollbars to appear.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

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: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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 you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

800 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