Solved

List control doesn't scroll

Posted on 1997-03-14
1
178 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
1 Comment
 
LVL 4

Accepted Solution

by:
mbhakta earned 50 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

763 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

12 Experts available now in Live!

Get 1:1 Help Now