[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

LIST VIEW CONTROL - WHY DOESN't IT SCROLL?

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

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…
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 video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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…
Suggested Courses

829 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