Solved

List control doesn't scroll

Posted on 1997-03-14
1
186 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 50 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 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