Solved

List control doesn't scroll

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.

756 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