Solved

LIST VIEW CONTROL - WHY DOESN't IT SCROLL?

Posted on 1998-12-26
4
199 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 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

Industry Leaders: 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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

756 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