Solved

LIST VIEW CONTROL - WHY DOESN't IT SCROLL?

Posted on 1998-12-26
4
193 Views
Last Modified: 2010-04-16
I have added items to a list view control which is contained
in a property sheet. The trouble is that the control is not big enough to display all the icons. I thought it would automatically have scroll bars when too many icons were added to it. Can anyone tell me if there is some setting that I have missed or any other way to enable scroll bars?
0
Comment
Question by:rangers99
4 Comments
 
LVL 2

Expert Comment

by:zyqwert
ID: 1181054
See if your list view has the style LVS_NOSCROLL (0x2000) using spy or GetWindowLong.

0
 
LVL 1

Expert Comment

by:The_Brain
ID: 1181055
did you do this via wizard?  if so then I could help.
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1181056
Did you create the listbox with the WS_VSCROLL style?
0
 

Author Comment

by:rangers99
ID: 1181057
No I created the listbox in the resource editor.

I dont know if the following code is helpful. It is in the InitDialog() function adds 24 items to the listbox control. I can only see the first 10 icons because there are no scroll bars.
Any ideas how to make the scroll bars appear?


m_ImageList.Create(IDB_TEXTURESBMP,32,24,RGB(255,255,255));
m_TexturesList.SetImageList(&m_ImageList, LVSIL_NORMAL);

LV_ITEM listItem;
listItem.mask = LVIF_TEXT | LVIF_IMAGE;
listItem.iSubItem = 0;

for(int nItem = 0; nItem<24; nItem++)
{
   listItem.iItem = nItem;
   listItem.pszText = m_TextureNames[nItem];
   listItem.iImage = nItem;
   m_TexturesList.InsertItem(&listItem);
}

 
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

757 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

18 Experts available now in Live!

Get 1:1 Help Now