• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

List control doesn't scroll

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
eye
Asked:
eye
1 Solution
 
mbhaktaCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now