?
Solved

LIST VIEW CONTROL - WHY DOESN't IT SCROLL?

Posted on 1998-12-26
4
Medium Priority
?
205 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
[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
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 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

765 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