Solved

Interesting question on VC++ 5.0

Posted on 1998-10-08
3
184 Views
Last Modified: 2010-04-01
We have a dialog, which has a list box.
We would want to provide Horizontal scroll bars to the list box. We have already tried checking the horizontal control option, but that didnt work out. It works well for Vertical scroll bar. Kindly get back asap
0
Comment
Question by:pbhugra
[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
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1174658
The standard list box control can do horizontal or vertical scroll bars but not both.

Your options for a work round:
1. use List View control in details mode.    MFC has the handy CListCtrl class to process this.  These can handle both scroll bars
or
2. Add your own horizontal scroll bar external to the list, and scroll the content of the list box yourself (typically by using OwnerDraw and painting with an appropriate horizontal offset).  If you use message reflection you can handle the scroll bars in a class derived from CListBox and get a reusable list box with both horizontal and vertical scrollbars.

0
 
LVL 22

Expert Comment

by:nietod
ID: 1174659
Note to experts, I think answers2000 meant to answer with that.  It seems to be a good answer.
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1174660
Hmmm, well I kind of considered answering, and your 2nd opinion suggests I should...so I will now

pbhugra - see my 5:50 comment,
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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.

729 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