Solved

Interesting question on VC++ 5.0

Posted on 1998-10-08
3
178 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C Language combined operators 28 106
Would like to move button in a function 3 71
GUI: DIalog Stacking and Popping in MS C++ 4 64
FMX TCameraComponent Problem 2 48
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…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

948 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

19 Experts available now in Live!

Get 1:1 Help Now