Solved

Interesting question on VC++ 5.0

Posted on 1998-10-08
3
175 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
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 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.

762 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

15 Experts available now in Live!

Get 1:1 Help Now